pkg
FreeBSD binary package manager
TLDR
Install a package
$ pkg install [package]
Search for packages$ pkg search [query]
Update the package repository catalog$ pkg update
Upgrade all installed packages$ pkg upgrade
Remove a package$ pkg delete [package]
List all installed packages$ pkg info
Show details for a specific installed package$ pkg info [package]
Audit installed packages for security vulnerabilities$ pkg audit -F
Lock a package to prevent upgrades$ pkg lock [package]
SYNOPSIS
pkg [command] [options] [package...]
DESCRIPTION
pkg is the official binary package manager for FreeBSD. It handles installation, removal, upgrading, and searching of pre-built packages from FreeBSD repositories, replacing the older pkg_add tools.The tool resolves dependencies automatically, manages a local package database, and supports multiple repositories. It can also lock packages to prevent upgrades, audit installed packages for security vulnerabilities, and create packages from installed ports.
PARAMETERS
install PACKAGE
Install a package and its dependencies.search QUERY
Search for packages in remote repositories.update
Update the remote repository catalog.upgrade
Upgrade installed packages to latest available versions.delete PACKAGE
Remove a package.info [PACKAGE]
Show information about installed packages, or details for a specific package.audit [-F]
Audit installed packages for known security vulnerabilities. -F fetches the latest database.lock PACKAGE
Lock a package to prevent modification or deletion.unlock PACKAGE
Unlock a previously locked package.autoremove
Remove unneeded packages that were installed as dependencies.query FORMAT [PACKAGE]
Query information about installed packages using a format string.clean
Clean the local cache of fetched packages.
CONFIGURATION
/usr/local/etc/pkg.conf
Main configuration file for pkg behavior and default settings./usr/local/etc/pkg/repos/
Repository configuration directory with per-repo .conf files.
CAVEATS
FreeBSD specific. Root required for install. Repository based.
HISTORY
pkg replaced pkg_add as the FreeBSD package manager.
