Little Known Facts

Some basic facts about gentoo.

Using emerge to install, upgrade and remove package

Installing: emerge PACKAGE

Upgrading: emerge -u PACKAGE or emerge -U PACKAGE

Removing: 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.

(use the --pretend or -p option)

Updating vs upgrading only

There are two distinct methods of upgrading your system:

  1. Updating will install the latest stable version of the package which may result in a downgrade. (use the --update or -u option)

  2. This method will also install the latest stable version of a package but will not result in a downgrade. (use the --upgradeonly or -U option)

Special package names

There are (at least) two special package names:

  1. system denotes packages that are essential for operation
  2. world denotes all installed packages (/var/cache/edb/world)

Limitation of updating/upgrading world

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: emerge '=CATEGORY/PACKAGE-VERSION'

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

Maintenance tools

Feedback is always welcome! If you'd like to get in touch with me concerning the contents of this article, please use Twitter.