emerge: the other white meat (command-line interface to the Portage system) Usage: emerge [ options ] [ action ] [ ebuild | tbz2 | file | @set | atom ] [ ... ] emerge [ options ] [ action ] < system | world > emerge < --sync | --metadata | --info > emerge --resume [ --pretend | --ask | --skipfirst ] emerge --help [ --verbose ] Options: -[abBcCdDefgGhjkKlnNoOpPqrsStuvV] [ --color < y | n > ] [ --columns ] [ --complete-graph ] [ --deep ] [ --jobs JOBS ] [ --keep-going ] [ --load-average LOAD ] [ --newuse ] [ --noconfmem ] [ --nospinner ] [ --oneshot ] [ --onlydeps ] [ --reinstall changed-use ] [ --with-bdeps < y | n > ] Actions: [ --depclean | --list-sets | --search | --sync | --version ] Help (this screen): --help (-h short option) Displays this help; an additional argument (see above) will tell emerge to display detailed help. Actions: --clean Cleans the system by removing outdated packages which will not remove functionalities or prevent your system from working. The arguments can be in several different formats : * world * system or * 'dependency specification' (in single quotes is best.) Here are a few examples of the dependency specification format: binutils matches binutils-2.11.90.0.7 and binutils-2.11.92.0.12.3-r1 sys-devel/binutils matches binutils-2.11.90.0.7 and binutils-2.11.92.0.12.3-r1 >sys-devel/binutils-2.11.90.0.7 matches binutils-2.11.92.0.12.3-r1 >=sys-devel/binutils-2.11.90.0.7 matches binutils-2.11.90.0.7 and binutils-2.11.92.0.12.3-r1 <=sys-devel/binutils-2.11.92.0.12.3-r1 matches binutils-2.11.90.0.7 and binutils-2.11.92.0.12.3-r1 --config Runs package-specific operations that must be executed after an emerge process has completed. This usually entails configuration file setup or other similar setups that the user may wish to run. --depclean (-c short option) Cleans the system by removing packages that are not associated with explicitly merged packages. Depclean works by creating the full dependency tree from the @world set, then comparing it to installed packages. Packages installed, but not part of the dependency tree, will be uninstalled by depclean. See --with-bdeps for behavior with respect to build time dependencies that are not strictly required. Packages that are part of the world set will always be kept. They can be manually added to this set with emerge --noreplace . As a safety measure, depclean will not remove any packages unless *all* required dependencies have been resolved. As a consequence, it is often necessary to run emerge --update --newuse --deep @world prior to depclean. WARNING: Inexperienced users are advised to use --pretend with this option in order to see a preview of which packages will be uninstalled. Always study the list of packages to be cleaned for any obvious mistakes. Note that packages listed in package.provided (see portage(5)) may be removed by depclean, even if they are part of the world set. Also note that depclean may break link level dependencies. Thus, it is recommended to use a tool such as revdep-rebuild(1) in order to detect such breakage. Depclean serves as a dependency aware version of --unmerge. When given one or more atoms, it will unmerge matched packages that have no reverse dependencies. Use --depclean together with --verbose to show reverse dependencies. --deselect [ y | n ] Remove atoms and/or sets from the world file. This action is implied by uninstall actions, including --depclean, --prune and --unmerge. Use --deselect=n in order to prevent uninstall actions from removing atoms from the world file. --ignore-default-opts Causes EMERGE_DEFAULT_OPTS (see make.conf(5)) to be ignored. --info Displays important portage variables that will be exported to ebuild.sh when performing merges. This information is useful for bug reports and verification of settings. All settings in make.{conf,globals,defaults} and the environment show up if run with the '--verbose' flag. --list-sets Displays a list of available package sets. --metadata Transfers metadata cache from ${PORTDIR}/metadata/cache/ to /var/cache/edb/dep/ as is normally done on the tail end of an rsync update using emerge --sync. This process populates the cache database that portage uses for pre-parsed lookups of package data. It does not populate cache for the overlays listed in PORTDIR_OVERLAY. In order to generate cache for overlays, use --regen. --prune (-P short option) WARNING: This action can remove important packages! Removes all but the highest installed version of a package from your system. Use --prune together with --verbose to show reverse dependencies or with --nodeps to ignore all dependencies. --regen Causes portage to check and update the dependency cache of all ebuilds in the portage tree. This is not recommended for rsync users as rsync updates the cache using server-side caches. Rsync users should simply 'emerge --sync' to regenerate. In order to specify parallel --regen behavior, use the ---jobs and --load-average options. If you would like to generate and distribute cache for use by others, use egencache(1). --resume (-r short option) Resumes the most recent merge list that has been aborted due to an error. Please note that this operation will only return an error on failure. If there is nothing for portage to do, then portage will exit with a message and a success condition. A resume list will persist until it has been completed in entirety or until another aborted merge list replaces it. The resume history is capable of storing two merge lists. After one resume list completes, it is possible to invoke --resume once again in order to resume an older list. --search (-s short option) Searches for matches of the supplied string in the current local portage tree. By default emerge uses a case-insensitive simple search, but you can enable a regular expression search by prefixing the search string with %. Prepending the expression with a '@' will cause the category to be included in the search. A few examples: emerge --search libc list all packages that contain libc in their name emerge --search '%^kde' list all packages starting with kde emerge --search '%gcc$' list all packages ending with gcc emerge --search '%@^dev-java.*jdk' list all available Java JDKs --searchdesc (-S short option) Matches the search string against the description field as well the package's name. Take caution as the descriptions are also matched as regular expressions. emerge -S html emerge -S applet emerge -S 'perl.*module' --sync This updates the portage tree that is located in the directory that the PORTDIR variable refers to (default location is /usr/portage). The SYNC variable specifies the remote URI from which files will be synchronized. The PORTAGE_SYNC_STALE variable configures warnings that are shown when emerge --sync has not been executed recently. WARNING: The emerge --sync action will modify and/or delete files located inside the directory that the PORTDIR variable refers to (default location is /usr/portage). For more information, see the PORTDIR documentation in the make.conf(5) man page. NOTE: The emerge-webrsync program will download the entire portage tree as a tarball, which is much faster than emerge --sync for first time syncs. --unmerge (-C short option) WARNING: This action can remove important packages! Removes all matching packages. This does no checking of dependencies, so it may remove packages necessary for the proper operation of your system. Its arguments can be atoms or ebuilds. For a dependency aware version of --unmerge, use --depclean or --prune. --version (-V short option) Displays the currently installed version of portage along with other information useful for quick reference on a system. See emerge info for more advanced information. Options: --accept-properties=ACCEPT_PROPERTIES This option temporarily overrides the ACCEPT_PROPERTIES variable. The ACCEPT_PROPERTIES variable is incremental, which means that the specified setting is appended to the existing value from your configuration. The special -* token can be used to discard the existing configuration value and start fresh. See the MASKED PACKAGES section and make.conf(5) for more information about ACCEPT_PROPERTIES. A typical usage example for this option would be to use --accept- properties=-interactive to temporarily mask interactive packages. With default configuration, this would result in an effective ACCEPT_PROPERTIES value of "* -interactive". --alphabetical When displaying USE and other flag output, combines the enabled and disabled flags into a single list and sorts it alphabetically. With this option, output such as USE="dar -bar -foo" will instead be displayed as USE="-bar dar -foo" --ask [ y | n ] (-a short option) Before performing the action, display what will take place (server info for --sync, --pretend output for merge, and so forth), then ask whether to proceed with the action or abort. Using --ask is more efficient than using --pretend and then executing the same command without --pretend, as dependencies will only need to be calculated once. WARNING: If the "Enter" key is pressed at the prompt (with no other input), it is interpreted as acceptance of the first choice. Note that the input buffer is not cleared prior to the prompt, so an accidental press of the "Enter" key at any time prior to the prompt will be interpreted as a choice! Use the --ask-enter- invalid option if you want a single "Enter" key press to be interpreted as invalid input. --ask-enter-invalid When used together with the --ask option, interpret a single "Enter" key press as invalid input. This helps prevent accidental acceptance of the first choice. This option is intended to be set in the make.conf(5) EMERGE_DEFAULT_OPTS variable. --autounmask [ y | n ] Automatically unmask packages and generate package.use settings as necessary to satisfy dependencies. This option is enabled by default. If any configuration changes are required, then they will be displayed after the merge list and emerge will immediately abort. If the displayed configuration changes are satisfactory, you should copy and paste them into the specified configuration file(s), or enable the --autounmask-write option. The EMERGE_DEFAULT_OPTS variable may be used to disable this option by default in make.conf(5). --autounmask-write [ y | n ] If --autounmask is enabled, changes are written to config files, respecting CONFIG_PROTECT and --ask. --backtrack COUNT Specifies an integer number of times to backtrack if dependency calculation fails due to a conflict or an unsatisfied dependency (default: '10'). --binpkg-respect-use [ y | n ] Tells emerge to ignore binary packages if their use flags don't match the current configuration. (default: 'n') --buildpkg [ y | n ] (-b short option) Tells emerge to build binary packages for all ebuilds processed in addition to actually merging the packages. Useful for maintainers or if you administrate multiple Gentoo Linux systems (build once, emerge tbz2s everywhere) as well as disaster recovery. The package will be created in the ${PKGDIR}/All directory. An alternative for already-merged packages is to use quickpkg(1) which creates a tbz2 from the live filesystem. --buildpkgonly (-B short option) Creates a binary package, but does not merge it to the system. This has the restriction that unsatisfied dependencies must not exist for the desired package as they cannot be used if they do not exist on the system. --changed-use This is an alias for --reinstall=changed-use. --changelog (-l short option) When pretending, also display the ChangeLog entries for packages that will be upgraded. --color < y | n > Enable or disable color output. This option will override NOCOLOR (see make.conf(5)) and may also be used to force color output when stdout is not a tty (by default, color is disabled unless stdout is a tty). --columns Display the pretend output in a tabular form. Versions are aligned vertically. --complete-graph [ y | n ] This causes emerge to consider the deep dependencies of all packages from the world set. With this option enabled, emerge will bail out if it determines that the given operation will break any dependencies of the packages that have been added to the graph. Like the --deep option, the --complete-graph option will significantly increase the time taken for dependency calculations. Note that, unlike the --deep option, the --complete-graph option does not cause any more packages to be updated than would have otherwise been updated with the option disabled. Using --with-bdeps=y together with --complete-graph makes the graph as complete as possible. --config-root=DIR Set the PORTAGE_CONFIGROOT environment variable which is documented in the emerge(1) man page. --debug (-d short option) Tell emerge to run the ebuild command in --debug mode. In this mode, the bash build environment will run with the -x option, causing it to output verbose debug information print to stdout. --debug is great for finding bash syntax errors as providing very verbose information about the dependency and build process. --deep [DEPTH] (-D short option) This flag forces emerge to consider the entire dependency tree of packages, instead of checking only the immediate dependencies of the packages. As an example, this catches updates in libraries that are not directly listed in the dependencies of a package. Also see --with-bdeps for behavior with respect to build time dependencies that are not strictly required. --emptytree (-e short option) Reinstalls target atoms and their entire deep dependency tree, as though no packages are currently installed. You should run this with --pretend first to make sure the result is what you expect. --exclude ATOMS A space separated list of package names or slot atoms. Emerge won't install any ebuild or binary package that matches any of the given package atoms. --fail-clean [ y | n ] Clean up temporary files after a build failure. This is particularly useful if you have PORTAGE_TMPDIR on tmpfs. If this option is enabled, you probably also want to enable PORT_LOGDIR (see make.conf(5)) in order to save the build log. --fetchonly (-f short option) Instead of doing any package building, just perform fetches for all packages (main package as well as all dependencies.) When used in combination with --pretend all the SRC_URIs will be displayed multiple mirrors per line, one line per file. --fetch-all-uri (-F short option) Same as --fetchonly except that all package files, including those not required to build the package, will be processed. --getbinpkg [ y | n ] (-g short option) Using the server and location defined in PORTAGE_BINHOST, portage will download the information from each binary file there and it will use that information to help build the dependency list. This option implies '-k'. (Use -gK for binary-only merging.) --getbinpkgonly [ y | n ] (-G short option) This option is identical to -g, as above, except it will not use ANY information from the local machine. All binaries will be downloaded from the remote server without consulting packages existing in the packages directory. --jobs [JOBS] (-j short option) Specifies the number of packages to build simultaneously. If this option is given without an argument, emerge will not limit the number of jobs that can run simultaneously. Also see the related --load-average option. Note that interactive packages currently force a setting of --jobs=1. This issue can be temporarily avoided by specifying --accept- properties=-interactive. --keep-going [ y | n ] Continue as much as possible after an error. When an error occurs, dependencies are recalculated for remaining packages and any with unsatisfied dependencies are automatically dropped. Also see the related --skipfirst option. --load-average LOAD Specifies that no new builds should be started if there are other builds running and the load average is at least LOAD (a floating-point number). This option is recommended for use in combination with --jobs in order to avoid excess load. See make(1) for information about analogous options that should be configured via MAKEOPTS in make.conf(5). --misspell-suggestions < y | n > Enable or disable misspell suggestions. By default, emerge will show a list of packages with similar names when a package doesn't exist. The EMERGE_DEFAULT_OPTS variable may be used to disable this option by default --newuse (-N short option) Tells emerge to include installed packages where USE flags have changed since compilation. This option also implies the --selective option. If you would like to skip rebuilds for which disabled flags have been added to or removed from IUSE, see the related --reinstall=changed-use option. --noconfmem Portage keeps track of files that have been placed into CONFIG_PROTECT directories, and normally it will not merge the same file more than once, as that would become annoying. This can lead to problems when the user wants the file in the case of accidental deletion. With this option, files will always be merged to the live fs instead of silently dropped. --nodeps (-O short option) Merge specified packages, but don't merge any dependencies. Note that the build may fail if deps aren't satisfied. --noreplace (-n short option) Skip the packages specified on the command-line that have already been installed. Without this option, any packages, ebuilds, or deps you specify on the command-line *will* cause Portage to remerge the package, even if it is already installed. Note that Portage won't remerge dependencies by default. Also note that this option takes precedence over options such as --newuse, preventing a package from being reinstalled even though the corresponding USE flag settings may have changed. --nospinner Disables the spinner regardless of terminal type. --usepkg-exclude ATOMS A space separated list of package names or slot atoms. Emerge will ignore matching binary packages. --rebuild-exclude ATOMS A space separated list of package names or slot atoms. Emerge will not rebuild matching packages due to --rebuild. --rebuild-ignore ATOMS A space separated list of package names or slot atoms. Emerge will not rebuild packages that depend on matching packages due to --rebuild. --oneshot (-1 short option) Emerge as normal, but don't add packages to the world profile. This package will only be updated if it is depended upon by another package. --onlydeps (-o short option) Only merge (or pretend to merge) the dependencies of the specified packages, not the packages themselves. --package-moves [ y | n ] Perform package moves when necessary. This option is enabled by default. WARNING: This option should remain enabled under normal circumstances. Do not disable it unless you know what you are doing. --pretend (-p short option) Instead of actually performing the merge, simply display what ebuilds and tbz2s *would* have been installed if --pretend weren't used. Using --pretend is strongly recommended before installing an unfamiliar package. In the printout, N = new, U = updating, R = replacing, F = fetch restricted, B = blocked by an already installed package, D = possible downgrading, S = slotted install. --verbose causes affecting use flags to be printed out accompanied by a '+' for enabled and a '-' for disabled USE flags. --quiet [ y | n ] (-q short option) Effects vary, but the general outcome is a reduced or condensed output from portage's displays. --quiet-build [ y | n ] Redirect all build output to logs alone, and do not display it on stdout. --quiet-unmerge-warn Disable the warning message that's shown prior to --unmerge actions. This option is intended to be set in the make.conf(5) EMERGE_DEFAULT_OPTS variable. --rebuild-if-new-rev [ y | n ] Rebuild packages when dependencies that are used at both build-time and run-time are built, if the dependency is not already installed with the same version and revision. --rebuild-if-new-ver [ y | n ] Rebuild packages when dependencies that are used at both build-time and run-time are built, if the dependency is not already installed with the same version. Revision numbers are ignored. --rebuild-if-unbuilt [ y | n ] Rebuild packages when dependencies that are used at both build-time and run-time are built. --rebuilt-binaries [ y | n ] Replace installed packages with binary packages that have been rebuilt. Rebuilds are detected by comparison of BUILD_TIME package metadata. This option is enabled automatically when using binary packages (--usepkgonly or --getbinpkgonly) together with --update and --deep. --rebuilt-binaries-timestamp=TIMESTAMP This option modifies emerge's behaviour only if --rebuilt- binaries is given. Only binaries that have a BUILD_TIME that is larger than the given TIMESTAMP and that is larger than that of the installed package will be considered by the rebuilt-binaries logic. --reinstall changed-use Tells emerge to include installed packages where USE flags have changed since installation. Unlike --newuse, this option does not trigger reinstallation when flags that the user has not enabled are added or removed. --reinstall-atoms ATOMS A space separated list of package names or slot atoms. Emerge will treat matching packages as if they are not installed, and reinstall them if necessary. --root=DIR Set the ROOT environment variable which is documented in the emerge(1) man page. --root-deps[=rdeps] If no argument is given then build-time dependencies of packages for ROOT are installed to ROOT instead of /. If the rdeps argument is given then discard all build-time dependencies of packages for ROOT. This option is only meaningful when used together with ROOT and it should not be enabled under normal circumstances. For currently supported EAPI values, the build-time dependencies are specified in the DEPEND variable. However, behavior may change for new EAPIs when related extensions are added in the future. --select [ y | n ] Add specified packages to the world set (inverse of --oneshot). This is useful if you want to use EMERGE_DEFAULT_OPTS to make --oneshot behavior default. --selective [ y | n ] This is similar to the --noreplace option, except that it does not take precedence over options such as --newuse. Some options, such as --update, imply --selective. Use --selective=n if you want to forcefully disable --selective, regardless of options like --update. --skipfirst This option is only valid when used with --resume. It removes the first package in the resume list. Dependencies are recalculated for remaining packages and any that have unsatisfied dependencies or are masked will be automatically dropped. Also see the related --keep-going option. --tree (-t short option) Shows the dependency tree using indentation for dependencies. The packages are also listed in reverse merge order so that a package's dependencies follow the package. Only really useful in combination with --emptytree, --update or --deep. --unordered-display By default the displayed merge list is sorted using the order in which the packages will be merged. When --tree is used together with this option, this constraint is removed, hopefully leading to a more readable dependency tree. --update (-u short option) Updates packages to the best version available, which may not always be the highest version number due to masking for testing and development. Package atoms specified on the command line are greedy, meaning that unspecific atoms may match multiple versions of slotted packages. --use-ebuild-visibility [ y | n ] Use unbuilt ebuild metadata for visibility checks on built packages. --useoldpkg-atoms ATOMS A space separated list of package names or slot atoms. Emerge will prefer matching binary packages over newer unbuilt packages. --usepkg [ y | n ] (-k short option) Tell emerge to use binary packages (from $PKGDIR) if they are available, thus possibly avoiding some time-consuming compiles. This option is useful for CD installs; you can export PKGDIR=/mnt/cdrom/packages and then use this option to have emerge "pull" binary packages from the CD in order to satisfy dependencies. --usepkgonly [ y | n ] (-K short option) Like --usepkg above, except this only allows the use of binary packages, and it will abort the emerge if the package is not available at the time of dependency calculation. --verbose (-v short option) Effects vary, but the general outcome is an increased or expanded display of content in portage's displays. --with-bdeps < y | n > In dependency calculations, pull in build time dependencies that are not strictly required. This defaults to 'n' for installation actions and 'y' for the --depclean action. This setting can be added to EMERGE_DEFAULT_OPTS (see make.conf(5)) and later overridden via the command line.