{"id":1712,"date":"2025-06-11T11:42:50","date_gmt":"2025-06-11T10:42:50","guid":{"rendered":"https:\/\/editjournal.redakt.eu\/faxmodem\/?p=1712"},"modified":"2025-06-11T11:42:50","modified_gmt":"2025-06-11T10:42:50","slug":"freebsd-pkg-reinstall-config","status":"publish","type":"post","link":"https:\/\/editjournal.redakt.eu\/faxmodem\/blog\/servers\/freebsd-pkg-reinstall-config\/","title":{"rendered":"Reisntalling package with default config files"},"content":{"rendered":"<p>If you delete a package using e.g. <code>pkg delete nginx<\/code> it will leave the configuration files behind. If you then delete <code>\/usr\/local\/etc\/nginx<\/code> manually and reinstall the package using e.g. <code>pkg install nginx<\/code>, it will not restore the default configs, because it thinks this is not the first install of said package on the system and you deleted the configs intentionally.<\/p>\n<p>To reinstall the package with configs as if it was never installed, use <code>-f<\/code>:<\/p>\n<pre><code>pkg delete -f nginx-lite\npkg install -f nginx-lite<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>If you delete a package using e.g. pkg delete nginx it will leave the configuration files behind. If you then delete \/usr\/local\/etc\/nginx manually and reinstall the package using e.g. pkg install nginx, it will not restore the default configs, because it thinks this is not the first install of said package on the system and&hellip; <a class=\"more-link\" href=\"https:\/\/editjournal.redakt.eu\/faxmodem\/blog\/servers\/freebsd-pkg-reinstall-config\/\">Continue reading <span class=\"screen-reader-text\">Reisntalling package with default config files<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[956],"tags":[1254],"class_list":["post-1712","post","type-post","status-publish","format-standard","hentry","category-servers","tag-freebsd","entry"],"_links":{"self":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts\/1712","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/comments?post=1712"}],"version-history":[{"count":1,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts\/1712\/revisions"}],"predecessor-version":[{"id":1713,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts\/1712\/revisions\/1713"}],"wp:attachment":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/media?parent=1712"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/categories?post=1712"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/tags?post=1712"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}