Package sets

Package sets are Article description::sets of packages used by Portage. They define the packages that make up the base system and those that are installed based on user action.

Using sets
Sets can be passed as an argument to emerge:

The list of available sets can be found by:

System defining sets
All Gentoo systems have six sets that define the packages that make up the system. The selected* sets define which sets the user wants while the system and profile sets define which package are required for the base system.

@selected-packages
The selected-packages set is the list of packages in the world file. It is the set of packages that have been explicitly installed by the user.

@selected-sets
The selected-sets set is the set of user defined sets (see below) that have been explicitly emerged. The sets are listed in the file. The set may be empty.

@selected
The selected set is the union of @selected-package and @selected-sets.

@system
The system set along with @profile define the base set of packages on a Gentoo system.

@profile
The profile set along with @system define the base set of packages on a Gentoo system. The differences between the two is described in the man pages of Portage but the distinction does not usually matter to the user. The packages that make up the sets are determined by the profile and architecture of the system.

@world
The world set is the union of @selected, @system, and @profile.

Example: @larrys-defined-set
larrys-defined-set is an example of a user defined set. Users can define sets in which can then be rebuilt by  like any other set:

In addition to emerging the packages, the set itself will be added to @selected-sets and therefore also be part of @selected. This is fine if the packages in Larry's set are all end-user packages. However if some of the packages in Larry's set are only dependencies it can cause problems because the package will continue to be updated even if it is no longer required. It is equivalent to having dependencies in the world file. To emerge a user set without adding the package to the @selected-set run:

To stop using a user defined set, deselect it:

Other sets
Portage maintains other sets that are based on the state or type of package. Unlike the previous sets, these cannot define packages that should be installed. The members of the sets are determined by Portage and are not user editable. The sets are listed in but should not be edited.

@changed-deps
changed-deps is the set of packages that have changed dependencies.

@deprecated-live-rebuild
deprecated-live-rebuild is the older way to get the set of live packages.

@downgrade
downgrade is the set of packages that have an installed version that is higher than the highest visible ebuild version.

@installed
installed is the set of all installed packages.

@live-rebuild
live-rebuild is the set of live (category/package-9999) packages.

@module-rebuild
module-rebuild is the set of out of kernel modules, packages that own files in.

@preserved-rebuild
preserved-rebuild is the set of packages that are using preserved libraries.

@rebuilt-binaries
rebuilt-binaries is the set of binary package that can be replaced with packages that have been rebuilt.

@security
security is the set of packages for which there is a new GLSA.

@unavailable
unavailable is the set of installed packages that do not have an ebuild.

@unavailable-binaries
unavailable is the set of installed packages that do not have a binary package.

@x11-module-rebuild
x11-module-rebuild is the set of packages that own files inside with the exception of the package that owns.