Showing posts with label portage. Show all posts
Showing posts with label portage. Show all posts

Cleaning out distfiles on Gentoo

One thing about Gentoo is that it takes a bit of hard disk space to run it. For example the distfiles of outdated ebuilds do not automatically get cleaned out.

But doing so is a breeze with eclean utility from app-portage/gentoolkit

To clean (adding -i will prompt you before deletion, so it is also a dry run):
eclean -i distfiles


There are any number of ways you can do automatic cleaning, a few that come to mind are:
  • adding cron task
  • /etc/portage/postsync.d to clean out after every sync

Cleaning up package.keywords and more ...

If you are a power Gentoo user your package.keywords tends to get a bit full. Same is true of package.mask, package.unmask, package.use.

What's worse is that after a while the version program your wanted goes stable you have to remember the remove the reference to it in one of the /etc/portage/package.* files or potentially spend more time resolving dependencies.

Fortunately there is an excellent solution available in the form of eix-test-obsolete command. I'll let its help page describe itself:

It calls eix -tTc several times with various variable settings in order to
display missing packages or packages with obsolete entries in
/etc/portage/package.*

Eix is the uberfast, pre-cached Portage search alternative to emerge -s that every Gentoo system should have.

emerge -av app-portage/eix