LinuxCommandLibrary

eselect-repository

Enable, disable, or manage software repositories

TLDR

List all ebuild repositories registered on

$ eselect repository list
copy

List enabled repositories
$ eselect repository list -i
copy

Enable a repository from the list by its name or index from the list command
$ eselect repository enable [name|index]
copy

Enable an unregistered repository
$ eselect repository add [name] [rsync|git|mercurial|svn|...] [sync_uri]
copy

Disable repositories without removing their contents
$ eselect repository disable [repo1 repo2 ...]
copy

Disable repositories and remove their contents
$ eselect repository remove [repo1 repo2 ...]
copy

Create a local repository and enable it
$ eselect repository create [name] [path/to/repo]
copy

SYNOPSIS

eselect repository action [options] [arguments]

PARAMETERS

list
    List all available repositories, showing enabled/disabled status

list-cache-formats
    Show supported cache formats for repositories

enable <repo>
    Enable specified repository(s); use --force to override conflicts

disable <repo>
    Disable specified repository(s)

update [<repo>]
    Update repository metadata; --deep for recursive sync

fetch <repo>
    Fetch repository configuration without enabling

--all
    Show all repositories including disabled ones (with list)

--force
    Force action despite warnings or conflicts

--deep
    Perform deep update including submodules

--quiet
    Suppress non-error output

--help
    Display help

--usage
    Show brief usage

DESCRIPTION

The eselect repository command is a module of the eselect framework in Gentoo Linux, used to manage Portage repositories defined in /etc/portage/repos.conf/. It allows users to list, enable, disable, update, and fetch repository metadata and configurations. This tool simplifies handling official Gentoo repos, overlays, and third-party sources without manual editing of config files.

Key functions include enabling repositories for package access, disabling unused ones to reduce load, and updating cache formats or syncing changes. It's essential for Gentoo users customizing their Portage tree, especially with overlays from sources like GURU or GentooZed. Actions ensure repository integrity by validating configs and handling priority orders.

Usage integrates with emerge for seamless package management, promoting a declarative repo setup.

CONFIGURATION LOCATION

Repos managed in /etc/portage/repos.conf/; backups in /usr/share/portage/repos.conf/

PRIORITY HANDLING

Enabled repos ordered by priority key; higher numbers first

HISTORY

Introduced in Gentoo's eselect around 2010 as repo management evolved from manual repos.conf edits. Enhanced with news overlay support in 2015; now standard for GLEP 74 repo format compliance.

SEE ALSO

eselect(1), emerge(1), layman(8), portage(5)

Copied to clipboard