LinuxCommandLibrary

emaint

Perform Gentoo system maintenance

TLDR

Synchronize repositories that are set to auto-sync (default for most repositories)

$ sudo emaint sync [[-a|--auto]]
copy

Synchronize a specific repository
$ sudo emaint sync [[-r|--repo]] [repository]
copy

Synchronize all repositories
$ sudo emaint sync [[-A|--allrepos]]
copy

Clear the Portage resume list
$ sudo emaint cleanresume [[-f|--fix]]
copy

Clean Portage logs
$ sudo emaint logs [[-C|--clean]]
copy

SYNOPSIS

emaint subcommand [options...]

PARAMETERS

subcommand
    The specific maintenance operation to perform. Each subcommand has its own set of options.

world
    Rebuilds packages in the @world set, ensuring dependencies are met and profile settings are respected. This is frequently used after system updates or profile changes.

sync
    Synchronizes the Portage tree with the latest package information from configured repositories. Note that emerge --sync or app-portage/webrsync are often preferred for this task today.

clean
    Cleans up old source archives (distfiles) in /var/cache/distfiles and obsolete binary packages or package build directories. This helps reclaim disk space.

config
    Updates system configuration files by invoking etc-update or dispatch-conf. It prompts the administrator to review and merge changes from new package versions.

binhost
    Manages binary packages, facilitating their creation, installation, and general administration on systems that utilize a binary package host.

diff
    Shows differences in configuration files without performing any updates, similar to the review step of etc-update or dispatch-conf.

--help
    Displays general help information for emaint, or specific help for a given subcommand when used as emaint subcommand --help.

--version
    Displays the emaint utility's version information.

DESCRIPTION

emaint is a powerful and versatile command-line utility designed for managing various system maintenance tasks on a Gentoo Linux system. It provides a unified interface for operations such as synchronizing the Portage tree, rebuilding the system's @world package set, cleaning up obsolete packages and source files, and managing configuration file updates. While some of its functionalities can be achieved through other Portage tools (like emerge), emaint often simplifies complex workflows by grouping related actions under intuitive subcommands, making system administration more efficient for Gentoo users. It's an essential tool for keeping a Gentoo system healthy and up-to-date.

CAVEATS

emaint is an integral tool for Gentoo Linux and relies heavily on its Portage package manager. Most operations require root privileges. Misuse of certain subcommands, particularly world or clean, can potentially lead to system instability, unbootable systems, or data loss if not carefully managed. Some functionalities, like sync, have more modern or commonly adopted alternatives.

SUBCOMMAND-SPECIFIC HELP

emaint operates primarily through its subcommands. To get detailed help and options for a particular subcommand, always use the --help flag with the subcommand. For example, to see options for rebuilding the @world set, execute:
emaint world --help

CONFIGURATION FILE MANAGEMENT IMPORTANCE

The emaint config subcommand is crucial for maintaining system stability on Gentoo. It automates the process of reviewing and merging updated configuration files (often presented as .config.new files) provided by new package versions. Regularly running this command (e.g., after every major emerge -uDNa @world) is vital to prevent system breakage due to outdated or incompatible configuration files.

HISTORY

emaint has been an integral part of the Gentoo Linux ecosystem for many years, providing a structured way to perform common system maintenance tasks. Its development has closely followed the evolution of Portage itself, adapting to new functionalities and best practices in Gentoo system administration. It aims to consolidate various maintenance routines into a single, easy-to-use interface, simplifying the maintenance burden for Gentoo users.

SEE ALSO

emerge(1), etc-update(8), dispatch-conf(8), portage(5)

Copied to clipboard