Saturday, April 14, 2007

eclean can be your friend, it is a part of the gentoolkit. If you don't have the gentoolkit: emerge gentoolkit.eclean can cleanup distribution files and packages. Because you are a regular emerge --sync, emerge --update --deep --ask world sort of person, you will likely be using disk space on all those old packages you have upgraded out of.

eclean distfileseclean packages

DESCRIPTION

eclean is small tool to remove obsolete portage sources files and binary packages. Used on a regular basis, it prevents your DISTDIR and PKGDIR directories to infinitely grow, while not deleting files which may still be useful.

By default, eclean will protect all distfiles or binary packages corresponding to some ebuilds available in the Portage tree. This is the safest mode, since it will protect whatever may still be useful, for instance to downgrade a package without downloading its sources for the second time, or to reinstall a package you unmerge by mistake without recompiling it. Sure, it's also a mode in which your DISTDIR and PKGDIR will stay rather big (although still not growing infinitly). For the 'distfiles', this mode is also quit slow mode because it requiries some access to the whole Portage tree.

If you use the --destructive option, eclean will only protect files corresponding to some currently installed package (taking their exact version into account). It will save much more space, while still preserving sources files around for minor revision bumps, and binaries for reinstallation of corrupted packages. But it won't keep files for less usual operations like downgrading or reinstalling an unmerged package. This is also the fastest execution mode (big difference for distfiles), and the one used by most other cleaning scripts around like yacleaner (at least in its version 0.3).

Somewhere in the middle, adding the --package-names option when using --destructive will protect files corresponding to all existing versions of installed packages. It will allow easy downgrading without recompilation or redownloading in case of trouble, but won't protect you against package uninstallation.

In addition to this main modes, some options allow to declare a few special cases file protection rules:

o

--time-limit is useful to protect files which are more recent than a given amount of time.

o

--size-limit (for distfiles only) is useful if you want to protect files bigger than a given size.

o

--fetch-restricted (for distfiles only) is useful to protect manually downloaded files. But it's also very slow (again, it's a reading of the whole Portage tree data)...

o

Finally, you can list some categories or package names to protect in exclusion files (see EXCLUSION FILES below).

7 comments:

You have a wonderful Blog. I really enjoyed reading it. I was bored and I started searching for different Blogs and I happen to come across your blog. I bet a lot of people would like to read this blog, I get a lot of free traffic hits from http://www.autosurfmonster.com if I were you I would submit this blog to them so thousands of others can see it. Well I wish you warm regards and continued success. I have added your blog to my favorites so I will look forward to all the updates. Thanks again

I have read your blog carefully and like it a lot! We have the same opnion! Could you check my blog at: www.muslimfriends.com/i/free to check my blog title: helenwang`s blog"? May be we can talk further and be friends.

About this Blog

In truth this is my personal documentation area where I hope to save myself time by documenting my home projects, work projects. I also hope to be able to provide others with a simple HOWTO guides, FAQs and other tidbits.