emerge Command Examples in Gentoo Linux

The “emerge” command in Gentoo Linux is the main command-line utility for managing software packages and dependencies. It is the command-line interface to the Portage package manager, which is the default package manager for Gentoo Linux.

The “emerge” command can be used to install, update, and remove software packages, as well as to manage package dependencies. It can also be used to query the current state of installed packages and search for available packages in the Gentoo package repositories.

emerge Command Examples

1. Synchronize all packages:

# emerge --sync

2. Update all packages, including dependencies:

# emerge -uDNav @world

3. Resume a failed updated, skipping the failing package:

# emerge --resume --skipfirst

4. Install a new package, with confirmation:

# emerge -av package_name

5. Remove a package, with confirmation:

# emerge -Cav package_name

6. Remove orphaned packages (that were installed only as dependencies):

# emerge -avc

7. Search the package database for a keyword:

# emerge -S keyword
Related Post