Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
HardenedBSD-pkg docs pkg-repositories.8
.\"
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
.\" FreeBSD pkg - a next generation package for the installation and maintenance
.\" of non-core utilities.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\"     @(#)pkg.8
.\"
.Dd April 18, 2026
.Dt PKG-REPOSITORIES 8
.Os
.Sh NAME
.Nm "pkg repositories"
.Nd display and manage package repositories
.Sh SYNOPSIS
.Nm
.Op Fl d
.Op Fl e
.Op Fl l
.Op Ar repository
.Nm
.Ar repository
.Cm enable | disable | reset
.Sh DESCRIPTION
.Nm
displays configured software repositories for the package manager,
.Xr pkg 8 .
.Pp
If given the name of an existing repository as an argument,
only print its configuration.
Without arguments all repositories are printed.
.Pp
When a repository name is followed by an action
.Pq Cm enable , disable , or reset ,
.Nm
manages a persistent override for the repository's enabled state.
The override is stored as a file under
.Pa $PKG_DBDIR/repos_state/enable/
or
.Pa $PKG_DBDIR/repos_state/disable/
and takes precedence over the configuration files regardless of the
override chain.
.Pp
The
.Cm reset
action removes the override, reverting to the value from the
configuration files.
.Pp
When a repository's state is overridden, the
.Nm
and
.Cm pkg -vv
commands display
.Dq (overridden by pkg)
next to the enabled status.
.Sh OPTIONS
The following options are supported by
.Nm :
.Bl -tag -width quiet
.It Fl d , Fl -disabled
Print disabled repositories only.
.It Fl e , Fl -enabled
Print enabled repositories only.
.It Fl l , Fl -list
Print the list of repository names.
.El
.Sh ACTIONS
.Bl -tag -width disable
.It Cm enable
Force the repository to be enabled, overriding the configuration files.
.It Cm disable
Force the repository to be disabled, overriding the configuration files.
.It Cm reset
Remove a previous override, reverting to the configuration file value.
.El
.Sh FILES
.Bl -tag -width "/usr/local/etc/pkg/pkg.conf.sample"
.It Pa /etc/pkg/FreeBSD.conf
default system repository
.It Pa /usr/local/etc/pkg/pkg.conf
.Xr pkg 8
configuration, including system repository
.It Pa /usr/local/etc/pkg/pkg.conf.sample
example
.Xr pkg 8
monolithic configuration, including default repository
.It Pa /usr/local/etc/pkg/repos/
location for site specific repositories
.It Pa /var/db/pkg/repos_state/enable/
directory containing override files for enabled repositories
.It Pa /var/db/pkg/repos_state/disable/
directory containing override files for disabled repositories
.El
.Sh EXAMPLES
Display all repositories:
.Pp
.Dl pkg repositories -l
.Pp
Display all repositories configurations:
.Pp
.Dl pkg repositories
.Pp
Disable a repository:
.Pp
.Dl pkg repositories FreeBSD-ports disable
.Pp
Re-enable it:
.Pp
.Dl pkg repositories FreeBSD-ports enable
.Pp
Remove the override (revert to configuration):
.Pp
.Dl pkg repositories FreeBSD-ports reset
.Sh SEE ALSO
.Xr pkg_checksum 3 ,
.Xr pkg_create 3 ,
.Xr pkg_printf 3 ,
.Xr pkg_repo_create 3 ,
.Xr pkg_repos 3 ,
.Xr pkg-keywords 5 ,
.Xr pkg-lua-script 5 ,
.Xr pkg-repository 5 ,
.Xr pkg-script 5 ,
.Xr pkg-triggers 5 ,
.Xr pkg.conf 5 ,
.Xr pkg 8 ,
.Xr pkg-add 8 ,
.Xr pkg-alias 8 ,
.Xr pkg-annotate 8 ,
.Xr pkg-audit 8 ,
.Xr pkg-autoremove 8 ,
.Xr pkg-check 8 ,
.Xr pkg-checksum 8 ,
.Xr pkg-clean 8 ,
.Xr pkg-config 8 ,
.Xr pkg-create 8 ,
.Xr pkg-delete 8 ,
.Xr pkg-fetch 8 ,
.Xr pkg-help 8 ,
.Xr pkg-info 8 ,
.Xr pkg-install 8 ,
.Xr pkg-key 8 ,
.Xr pkg-lock 8 ,
.Xr pkg-plugins 8 ,
.Xr pkg-query 8 ,
.Xr pkg-register 8 ,
.Xr pkg-repo 8 ,
.Xr pkg-rquery 8 ,
.Xr pkg-rwhich 8 ,
.Xr pkg-search 8 ,
.Xr pkg-set 8 ,
.Xr pkg-shell 8 ,
.Xr pkg-shlib 8 ,
.Xr pkg-ssh 8 ,
.Xr pkg-stats 8 ,
.Xr pkg-triggers 8 ,
.Xr pkg-unregister 8 ,
.Xr pkg-update 8 ,
.Xr pkg-updating 8 ,
.Xr pkg-upgrade 8 ,
.Xr pkg-version 8 ,
.Xr pkg-which 8