{"id":63,"date":"2008-05-03T21:14:08","date_gmt":"2008-05-03T13:14:08","guid":{"rendered":"http:\/\/percy.blog.ubuntu.org.cn\/2008\/05\/03\/gentooclean-up-world-file\/"},"modified":"2008-05-03T21:14:08","modified_gmt":"2008-05-03T13:14:08","slug":"gentooclean-up-world-file","status":"publish","type":"post","link":"https:\/\/pjq.me\/?p=63","title":{"rendered":"[Gentoo]Clean up world file"},"content":{"rendered":"<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n<tr>\n<td align=\"center\" height=\"25\"><font color=\"#02368d\"><strong>[Gentoo]Clean up world file<\/strong><\/font><\/td>\n<\/tr>\n<tr>\n<td bgcolor=\"#d2dee2\" height=\"1\">&nbsp;<\/td>\n<\/tr>\n<tr>\n<td bgcolor=\"#ffffff\" height=\"1\">&nbsp;<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n<tr>\n<td width=\"100%\">let me name it &#8220;reverse approach&#8221;.<\/p>\n<p>You first make a back up and empty your world file:<br \/>\n1) gentoo ~ #cp \/var\/lib\/portage\/world ~\/ &amp;&amp; &gt;\/var\/lib\/portage\/world<br \/>\nand then build it again:<br \/>\n2) gentoo ~ #regenworld<\/p>\n<p>&#8220;regenworld&#8221; will put some packages which it thinks belong to the world<br \/>\nlist.<br \/>\nNow check what portage finds to be useless when the world set is almost<br \/>\nempty:<br \/>\n3) gentoo ~ #emerge &#8211;depclean &#8211;pretend<\/p>\n<p>From the list shown by the above command you chose the program packages<br \/>\nyou *want* to have installed and put them in the world file. One &#8220;atom&#8221;<br \/>\n(&#8220;category-name\/package-name&#8221;, without version numbers) per line.<br \/>\nNow do as &#8220;emerge &#8211;depclean&#8221; recommends:<\/p>\n<p>4) gentoo ~ #emerge &#8211;update &#8211;newuse &#8211;deep world<\/p>\n<p>Repeat the steps from (2) to (4) until (3) shows only packages that are<br \/>\nnot familiar to you and (4) doesn&#8217;t want to install anything.<\/p>\n<p>Next. Check if there are no system packages in the list (3) shows:<br \/>\n5) gentoo ~ #emerge -pve system<\/p>\n<p>It should not happen that (3) wants to remove system packages but its<br \/>\nbetter to be sure.<\/p>\n<p>Now &#8220;cross your fingers&#8221; and execute emerge &#8211;deplcean for real (without<br \/>\n&#8211;pretend).<br \/>\n6) emerge &#8211;deplcean<br \/>\nImmediately after (6) finishes you *must* do:<br \/>\n7) emerge -DuN world<br \/>\n8) revdep-rebuild<\/p>\n<p>When (8) is successfully finished you should have a &#8220;clean&#8221; world set<br \/>\nwithin a healthy system.<br \/>\nIf something goes wrong you can bring back your working &#8220;world&#8221; and<br \/>\nrecheck all packages:<\/p>\n<p>#cp ~\/world \/var\/lib\/portage\/world<br \/>\n#emerge -DuN world<br \/>\n#revdep-rebuild<\/td>\n<\/tr>\n<\/table>\n<\/td>\n<\/tr>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>[Gentoo]Clean up world file &nbsp; &nbsp; let me name it &#8220;reverse approach&#8221;. You first make a back up and empty your world file: 1) gentoo ~ #cp \/var\/lib\/portage\/world ~\/ &amp;&amp; &gt;\/var\/lib\/portage\/world and then build it again: 2) gentoo ~ #regenworld<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,23,29],"tags":[],"class_list":["post-63","post","type-post","status-publish","format-standard","hentry","category-command","category-config-files","category-gentoo"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>[Gentoo]Clean up world file - Jianqing&#039;s Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/pjq.me\/?p=63\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[Gentoo]Clean up world file - Jianqing&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"[Gentoo]Clean up world file &nbsp; &nbsp; let me name it &#8220;reverse approach&#8221;. You first make a back up and empty your world file: 1) gentoo ~ #cp \/var\/lib\/portage\/world ~\/ &amp;&amp; &gt;\/var\/lib\/portage\/world and then build it again: 2) gentoo ~ #regenworld\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pjq.me\/?p=63\" \/>\n<meta property=\"og:site_name\" content=\"Jianqing&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2008-05-03T13:14:08+00:00\" \/>\n<meta name=\"author\" content=\"pengjianqing\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"pengjianqing\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/pjq.me\/?p=63#article\",\"isPartOf\":{\"@id\":\"https:\/\/pjq.me\/?p=63\"},\"author\":{\"name\":\"pengjianqing\",\"@id\":\"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60\"},\"headline\":\"[Gentoo]Clean up world file\",\"datePublished\":\"2008-05-03T13:14:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/pjq.me\/?p=63\"},\"wordCount\":245,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60\"},\"articleSection\":[\"Command\",\"Config Files\",\"gentoo\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/pjq.me\/?p=63#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/pjq.me\/?p=63\",\"url\":\"https:\/\/pjq.me\/?p=63\",\"name\":\"[Gentoo]Clean up world file - Jianqing&#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\/\/pjq.me\/#website\"},\"datePublished\":\"2008-05-03T13:14:08+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/pjq.me\/?p=63#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/pjq.me\/?p=63\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/pjq.me\/?p=63#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/pjq.me\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[Gentoo]Clean up world file\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/pjq.me\/#website\",\"url\":\"https:\/\/pjq.me\/\",\"name\":\"Jianqing&#039;s Blog\",\"description\":\"Thoughts and Future\",\"publisher\":{\"@id\":\"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/pjq.me\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60\",\"name\":\"pengjianqing\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/pjq.me\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/pjq.me\/wp-content\/uploads\/2021\/12\/Screen-Shot-2021-12-02-at-6.10.58-PM.png\",\"contentUrl\":\"https:\/\/pjq.me\/wp-content\/uploads\/2021\/12\/Screen-Shot-2021-12-02-at-6.10.58-PM.png\",\"width\":460,\"height\":752,\"caption\":\"pengjianqing\"},\"logo\":{\"@id\":\"https:\/\/pjq.me\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/pjq.me\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[Gentoo]Clean up world file - Jianqing&#039;s Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/pjq.me\/?p=63","og_locale":"en_US","og_type":"article","og_title":"[Gentoo]Clean up world file - Jianqing&#039;s Blog","og_description":"[Gentoo]Clean up world file &nbsp; &nbsp; let me name it &#8220;reverse approach&#8221;. You first make a back up and empty your world file: 1) gentoo ~ #cp \/var\/lib\/portage\/world ~\/ &amp;&amp; &gt;\/var\/lib\/portage\/world and then build it again: 2) gentoo ~ #regenworld","og_url":"https:\/\/pjq.me\/?p=63","og_site_name":"Jianqing&#039;s Blog","article_published_time":"2008-05-03T13:14:08+00:00","author":"pengjianqing","twitter_card":"summary_large_image","twitter_misc":{"Written by":"pengjianqing","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pjq.me\/?p=63#article","isPartOf":{"@id":"https:\/\/pjq.me\/?p=63"},"author":{"name":"pengjianqing","@id":"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60"},"headline":"[Gentoo]Clean up world file","datePublished":"2008-05-03T13:14:08+00:00","mainEntityOfPage":{"@id":"https:\/\/pjq.me\/?p=63"},"wordCount":245,"commentCount":0,"publisher":{"@id":"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60"},"articleSection":["Command","Config Files","gentoo"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/pjq.me\/?p=63#respond"]}]},{"@type":"WebPage","@id":"https:\/\/pjq.me\/?p=63","url":"https:\/\/pjq.me\/?p=63","name":"[Gentoo]Clean up world file - Jianqing&#039;s Blog","isPartOf":{"@id":"https:\/\/pjq.me\/#website"},"datePublished":"2008-05-03T13:14:08+00:00","breadcrumb":{"@id":"https:\/\/pjq.me\/?p=63#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pjq.me\/?p=63"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/pjq.me\/?p=63#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/pjq.me\/"},{"@type":"ListItem","position":2,"name":"[Gentoo]Clean up world file"}]},{"@type":"WebSite","@id":"https:\/\/pjq.me\/#website","url":"https:\/\/pjq.me\/","name":"Jianqing&#039;s Blog","description":"Thoughts and Future","publisher":{"@id":"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pjq.me\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60","name":"pengjianqing","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/pjq.me\/#\/schema\/person\/image\/","url":"https:\/\/pjq.me\/wp-content\/uploads\/2021\/12\/Screen-Shot-2021-12-02-at-6.10.58-PM.png","contentUrl":"https:\/\/pjq.me\/wp-content\/uploads\/2021\/12\/Screen-Shot-2021-12-02-at-6.10.58-PM.png","width":460,"height":752,"caption":"pengjianqing"},"logo":{"@id":"https:\/\/pjq.me\/#\/schema\/person\/image\/"},"url":"https:\/\/pjq.me\/?author=1"}]}},"views":4467,"_links":{"self":[{"href":"https:\/\/pjq.me\/index.php?rest_route=\/wp\/v2\/posts\/63","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pjq.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pjq.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pjq.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pjq.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=63"}],"version-history":[{"count":0,"href":"https:\/\/pjq.me\/index.php?rest_route=\/wp\/v2\/posts\/63\/revisions"}],"wp:attachment":[{"href":"https:\/\/pjq.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=63"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pjq.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=63"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pjq.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=63"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}