{"id":2398,"date":"2015-09-24T11:29:24","date_gmt":"2015-09-24T11:29:24","guid":{"rendered":"http:\/\/truelogic.org\/wordpress\/?p=2398"},"modified":"2015-09-24T11:31:30","modified_gmt":"2015-09-24T11:31:30","slug":"freebsd-how-to-clean-and-rebuild-all-ports-with-portmaster","status":"publish","type":"post","link":"https:\/\/truelogic.org\/wordpress\/2015\/09\/24\/freebsd-how-to-clean-and-rebuild-all-ports-with-portmaster\/","title":{"rendered":"FreeBSD &#8211; How to clean and rebuild all ports with Portmaster"},"content":{"rendered":"<p>Thanks to <em>wblock<\/em>, one of the admins of forums.freebsd.org , the correct way to reinstall all existing ports with portmaster is given below:<\/p>\n<pre>1. portmaster --list-origins &gt; ~\/installed-port-list\r\n2. Update the ports tree\r\n3. portmaster -ty --clean-distfiles\r\n4. portmaster -Faf\r\n5. pkg delete -afy\r\n6. rm -rf <em>\/usr\/local\/lib\/compat\/pkg<\/em>\r\n7. Back up any files in <em>\/usr\/local<\/em> you wish to save, such as configuration files in <em>\/usr\/local\/etc<\/em>\r\n8. Manually check <em>\/usr\/local<\/em> and <em>\/var\/db\/pkg<\/em> to make sure that they are really empty\r\n9. Install <em>ports-mgmt\/pkg<\/em> and then <em>ports-mgmt\/portmaster<\/em>. Remove both from ~\/installed-port-list.\r\n10. portmaster --no-confirm `cat ~\/installed-port-list\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>Thanks to wblock, one of the admins of forums.freebsd.org , the correct way to reinstall all existing ports with portmaster is given below: 1. portmaster <a class=\"mh-excerpt-more\" href=\"https:\/\/truelogic.org\/wordpress\/2015\/09\/24\/freebsd-how-to-clean-and-rebuild-all-ports-with-portmaster\/\" title=\"FreeBSD &#8211; How to clean and rebuild all ports with Portmaster\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":1269,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-2398","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-freebsd"],"_links":{"self":[{"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/posts\/2398","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/comments?post=2398"}],"version-history":[{"count":3,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/posts\/2398\/revisions"}],"predecessor-version":[{"id":2401,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/posts\/2398\/revisions\/2401"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/media\/1269"}],"wp:attachment":[{"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/media?parent=2398"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/categories?post=2398"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/tags?post=2398"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}