eclean
Gentoo repository cleanup utility
TLDR
SYNOPSIS
eclean [options] target
DESCRIPTION
eclean cleans Gentoo repository source files and binary packages. It removes old or unused distfiles and packages to free disk space.The tool operates on two main targets: distfiles (source tarballs in /usr/portage/distfiles) and packages (binary packages in /usr/portage/packages). Over time, these directories accumulate old versions and files for uninstalled packages, consuming significant disk space.eclean provides both conservative and aggressive cleaning modes. Normal mode keeps files for installed packages and current portage tree entries, while deep mode only keeps files for currently installed packages. This is particularly useful on systems with limited storage or after system upgrades.
PARAMETERS
distfiles
Clean the source-download directory (DISTDIR, default `/var/cache/distfiles`).packages
Clean the binary-package directory (PKGDIR, default `/var/cache/binpkgs`).-d, --deep
Only keep files needed for currently installed packages (aggressive clean).-n, --package-names
Protect files by package name rather than exact version/slot.-p, --pretend
Dry-run: list what would be removed without deleting anything.-C, --color mode
Colorize output: yes, no, or auto.-t, --time-limit time
Protect files newer than time (e.g. `7d`, `1m`).-s, --size-limit size
Protect files larger than size (e.g. `50M`, `1G`).-e, --exclude-file file
Read additional exclusion patterns from file.-i, --interactive
Ask for confirmation before removing each file.-q, --quiet
Suppress informational output.-h, --help
Display help information.
CAVEATS
Gentoo-specific. Use -p to preview before deleting. Deep clean may remove files needed to reinstall packages.
SEE ALSO
emerge(1), eclean-kernel(1)
