Documentation

portage - Package manager for Gentoo

New in version 1.6.

Synopsis

Manages Gentoo packages

Requirements (on host that executes module)

  • gentoolkit

Options

parameter required default choices comments
changed_use
(added in 1.8)
no
  • yes
Include installed packages where USE flags have changed, except when
flags that the user has not enabled are added or removed
(--changed-use)
deep
no
  • yes
Consider the entire dependency tree of packages (--deep)
depclean
no
  • yes
  • no
Remove packages not needed by explicitly merged packages (--depclean)
If no package is specified, clean up the world's dependencies
Otherwise, --depclean serves as a dependency aware version of --unmerge
getbinpkg
no
  • yes
  • no
Prefer packages specified at PORTAGE_BINHOST in make.conf
newuse
no
  • yes
Include installed packages where USE flags have changed (--newuse)
nodeps
no
  • yes
  • no
Only merge packages but not their dependencies (--nodeps)
noreplace
no
  • yes
  • no
Do not re-emerge installed packages (--noreplace)
oneshot
no
  • yes
  • no
Do not add the packages to the world file (--oneshot)
onlydeps
no
  • yes
  • no
Only merge packages' dependencies but not the packages (--onlydeps)
package
no
    Package atom or set, e.g. sys-apps/foo or >foo-2.13 or @world
    quiet
    no
    • yes
    • no
    Run emerge in quiet mode (--quiet)
    state
    no present
    • present
    • installed
    • emerged
    • absent
    • removed
    • unmerged
    State of the package atom
    sync
    no
    • yes
    • web
    • no
    Sync package repositories first
    If yes, perform "emerge --sync"
    If web, perform "emerge-webrsync"
    update
    no
    • yes
    Update packages to the best version available (--update)
    usepkgonly
    no
    • yes
    • no
    Merge only binaries (no compiling). This sets getbinpkg=yes.
    verbose
    no
    • yes
    • no
    Run emerge in verbose mode (--verbose)

    Examples

    # Make sure package foo is installed
    - portage: package=foo state=present
    
    # Make sure package foo is not installed
    - portage: package=foo state=absent
    
    # Update package foo to the "best" version
    - portage: package=foo update=yes
    
    # Install package foo using PORTAGE_BINHOST setup
    - portage: package=foo getbinpkg=yes
    
    # Re-install world from binary packages only and do not allow any compiling
    - portage: package=@world usepkgonly=yes
    
    # Sync repositories and update world
    - portage: package=@world update=yes deep=yes sync=yes
    
    # Remove unneeded packages
    - portage: depclean=yes
    
    # Remove package foo if it is not explicitly needed
    - portage: package=foo state=absent depclean=yes
    

    This is an Extras Module

    For more information on what this means please read Extras Modules

    For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Helping Testing PRs and Developing Modules.