Little Known FactsPublished on 26 Feb 2004
Some basic facts about gentoo.
Using emerge to install, upgrade and remove package
emerge -u PACKAGE or
emerge -U PACKAGE
emerge -C PACKAGE
Importance of pretending
The above command can take a long time to complete or even leave your system in an unusable state. It is, therefore, recommended to verify that
emerge is about to perform what you want instead of what you said.
Updating vs upgrading only
There are two distinct methods of upgrading your system:
Updating will install the latest stable version of the package which may result in a downgrade. (use the
This method will also install the latest stable version of a package but will not result in a downgrade. (use the
Special package names
There are (at least) two special package names:
systemdenotes packages that are essential for operation
worlddenotes all installed packages (
Limitation of updating/upgrading
When issuing the above command
emerge -u world, only those packages which are listed in the world file and their direct dependencies are checked for updates although the full dependency tree may contain packages for which an update is available. To ensure that all packages in the full dependency tree of all packages in the world file are checked for update, use:
emerge -uD world
Handling specific versions
In case you need to work with a specific version of a package:
Installing untested package
The following command allows installing untested package:
ACCEPT_KEYWORDS="~x86" emerge PACKAGE. Be warned that those package are not extensively tested for Gentoo and may damage your system. See also masked vs ~arch.
Important customizable locations
/usr/portage/packages). This is the location where binary packages are stored by
emerge. See also binary packages.
/usr/portage/distfiles). Stores your distfiles outside of
/usr/portage. One reason is discussed in emerge rsync from behind a firewall.
PORTDIR_OVERLAY. Because of the fact that modifications in
/usr/portageget reversed during
emerge rsync, the specified path holds a custom portage tree.
etc-update rc-update env-update update-modules gcc-config java-config