Linux

Where Does Gentoo Portage Store Config and Packages?

Portage reads config from /etc/portage, ebuilds from /var/db/repos/gentoo, and builds in /var/tmp/portage.

Last updated

Portage splits its state three ways: human config in /etc/portage, the ebuild repository in /var/db/repos, and temporary build trees in /var/tmp/portage. Installed package records sit in /var/db/pkg beside them.

That layout tells you what to back up and what to purge. Config and world files define the system; build trees and binpkgs are disposable weight. Disk hungry Gentoo boxes almost always find the answer in /var/tmp/portage.

Where Gentoo stores this, by platform

Linux
/etc/portage

make.conf, package.use, package.accept_keywords and related config. Ebuild repo at /var/db/repos/gentoo synced by emerge. Build scratch in /var/tmp/portage, safe to empty when idle.

Frequently asked questions

how do i free disk space on gentoo

Empty /var/tmp/portage build trees and prune distfiles in /var/cache/distfiles. The ebuild repo and config stay small; builds are the hog.

where is the list of explicitly installed packages

In /var/lib/portage/world. Copy it with /etc/portage to reproduce the system on fresh hardware.

where are use flags configured

In /etc/portage/package.use files plus make.conf defaults. Run emerge with --ask first to preview what a flag change rebuilds.

Notice an outdated path? Let us know.