{"id":1571,"date":"2009-02-06T23:14:19","date_gmt":"2009-02-07T03:14:19","guid":{"rendered":"http:\/\/blogs.n1zyy.com\/n1zyy\/?p=1571"},"modified":"2009-02-06T23:14:19","modified_gmt":"2009-02-07T03:14:19","slug":"ubuntu-housekeeping","status":"publish","type":"post","link":"https:\/\/blogs.n1zyy.com\/n1zyy\/2009\/02\/06\/ubuntu-housekeeping\/","title":{"rendered":"Ubuntu Housekeeping"},"content":{"rendered":"<p>I&#8217;m a Linux nerd that spends some time in Vista. I tend to be a bit obsessive-compulsive, so I&#8217;ve found that I enjoy running CCleaner, defragging, and so forth.<\/p>\n<p>The problem is that Linux isn&#8217;t as crazy about accumulating cruft (at least, most things aren&#8217;t; if you set up custom log files and don&#8217;t set up logrotate to match, then you might&#8230; But that&#8217;s a problem of your making.) And ext3 doesn&#8217;t get fragmented<em>. (<\/em> That&#8217;s not <a href=\"http:\/\/en.wikipedia.org\/wiki\/Ext3#Defragmentation\">entirely true<\/a>, it&#8217;s just that fragmentation isn&#8217;t a big issue.)<\/p>\n<p>So if you&#8217;re like me and have come to miss the housekeeping, here are some things you might want to do:<\/p>\n<ul>\n    <li>Empty the trash. It used to be ~\/.Trash, but newer versions (Hardy and on, apparently) keep it in ~\/.local\/share\/Trash, with a &#8220;files&#8221; and &#8220;info&#8221; subdirectory. Always be careful with <tt>rm -rf<\/tt>, but <tt>rm -rf ~\/.Trash\/*<\/tt> or <tt>rm -rf ~\/.local\/share\/Trash\/info\/* && rm -rf ~\/.local\/share\/Trash\/files\/*<\/tt> ought to do the trick.<\/li>\n    <li>Some apt-get housekeeping:\n<ul>\n    <li>Check everything over (e.g., for errors): <tt>sudo apt-get check<\/tt><\/li>\n    <li>Remove old packages not used by anything: <tt>sudo apt-get autoremove<\/tt><\/li>\n    <li>Clean out your local repository of package files:\n<ul>\n    <li>The soft way, just removing &#8220;package files that can no longer be downloaded, and are largely  useless.&#8221;: <tt>sudo apt-get autoclean<\/tt><\/li>\n    <li>The hard way, removing most everything from \/var\/cache\/apt\/archives: <tt>sudo apt-get clean<\/tt><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Figure out where your disk space is going: <tt>du -sh ~\/*<\/tt>. This isn&#8217;t super-easy to interpret, though. (And it can take a while, since it looks at all of your home directory.) Applications \/ Accessories \/ Disk Usage Analyzer is way cooler.) It makes it easier for me to realize that, for example, the reason I have very little disk space is that I have my old 55GB Windows partition backed up. Since that&#8217;s copied to another disk, I can pretty safely blow that away, and have 50GB of disk to spare. It also turns up a few DVD ISOs (CentOS 5.1?!) that I definitely don&#8217;t need.<\/li>\n<\/ul>\n<p>The good news is that this did clean up some junk. It saved about 200MB of disk. (Not counting the ~50GB of backups I had created that I don&#8217;t need.) The bad news is that this really doesn&#8217;t do much that doesn&#8217;t get run when dealing with packages anyway. But it makes me feel good.<\/p>","protected":false},"excerpt":{"rendered":"<p>I&#8217;m a Linux nerd that spends some time in Vista. I tend to be a bit obsessive-compulsive, so I&#8217;ve found that I enjoy running CCleaner, defragging, and so forth. The problem is that Linux isn&#8217;t as crazy about accumulating cruft &hellip; <a href=\"https:\/\/blogs.n1zyy.com\/n1zyy\/2009\/02\/06\/ubuntu-housekeeping\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1571","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts\/1571","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/comments?post=1571"}],"version-history":[{"count":0,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts\/1571\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/media?parent=1571"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/categories?post=1571"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/tags?post=1571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}