Installation

Emerge

Usage

By default, source files are located in the /usr/portage/distfiles directory, while binary packages are located in the /usr/portage/packages directory. The locations for each can be changed by altering the DISTDIR and the PKGDIR variables respectively in /etc/portage/make.conf. Both locations can grow quite big if not periodically cleaned; this is the reason eclean was created.

Invocation

Use eclean --help to see full action summary, options list, and usage breakdown:

Cleaning distfiles

Cleaning packages

For the directory with the binary packages use the following command instead:

root #eclean packages

Or by running the short option:

root #eclean-pkg

Options

By default, source files and binary packages corresponding to any ebuild in the current repository will not be deleted. This way, system administrators can easily downgrade a package or install a previously removed package, provided the package is still in the current repository tree.

As an example, suppose packages foo-1.0 and foo-1.1 are both in the repository. After updating from foo-1.0 to foo-1.1, run eclean distfiles: source files for both versions will be kept, so if a problem occurs with foo-1.1 then the user can easily re-install foo-1.0 without re-downloading anything.

The other possible case is installing a previously removed package. Suppose that a package foo (any version) is installed on the system. After (inadvertently) removing it and running eclean distfiles, the source files for foo will be kept, so it can be re-installed without re-downloading anything.

The same examples also apply for binary packages.

To save more disk space, add the --deep option: every source file or binary package that does not correspond to some currently installed package (version does matter) will be deleted. Please notice that this way users will not be protected in case they need to downgrade a package or re-install a previously removed package.

As an alternative, use both the --deep and the --package-names options: every source file or binary package that does not correspond to some currently installed package (version does not matter) will be deleted. This still will not protect in case a re-install of a previously removed package is needed, but it will protect the sources if the package needs to be downgraded later.