No description
  • C 81.3%
  • Shell 14.8%
  • Tcl 3.4%
  • SmPL 0.4%
Find a file
Baptiste Daroussin eaa2efcfed 2.6.99.4
2026-03-22 19:17:42 +01:00
.builds curl m: fix more fallout 2026-03-14 08:00:03 +01:00
.github/workflows curl: remove remnant 2026-03-14 07:38:44 +01:00
autosetup autosetup: update to 7.2 2024-10-30 09:49:12 +01:00
compat libbsd: use C23 __has_include to simplity configure 2026-02-03 13:49:03 +01:00
docs query: add %y and %Y for provides/requires 2026-03-17 17:20:37 +01:00
external libfetch: move back to realloc to build on macOS 2026-03-14 15:33:28 +01:00
libpkg libpkg: attempt config file merge for force install 2026-03-21 08:31:42 +01:00
mk CSTD: use gnu17 as our new C standard 2025-02-12 12:03:06 +01:00
scripts 400.status-pkg: provide an option pour select the source to check 2026-03-16 14:37:30 +01:00
src info: fix version comparison after e1841f2e9 2026-03-22 19:14:40 +01:00
tests info: fix version comparison after e1841f2e9 2026-03-22 19:14:40 +01:00
.clang-format Add clang-format from the FreeBSD source tree 2024-09-17 09:18:16 +02:00
.editorconfig Add editorconfig 2024-04-05 08:39:02 +02:00
.gitignore C99: isnan is a standard c99 function stop looking for it 2026-01-26 14:31:00 +01:00
.gitlab-ci.yml
AUTHORS
auto.def 2.6.99.4 2026-03-22 19:17:42 +01:00
autogen.sh
configure Update to Autosetup 7.1 2024-01-18 16:44:50 +01:00
CONTRIBUTING.md
COPYING
Doxyfile.in
FAQ.md FAQ: remove the entry pointing at a hijacked external resource 2022-08-01 17:22:32 +02:00
features.md
freebsd.cfg
Kyuafile.in Fix out-of-tree libelf, libmachista and tests builds 2023-01-05 08:57:19 +01:00
Leak.suppress.in Review leak suppression 2025-02-09 21:15:41 +01:00
Makefile.autosetup LSAN: on macos exitcode=0 was not taken in account 2026-01-29 10:53:33 +01:00
NEWS 2.6.99.4 2026-03-22 19:17:42 +01:00
README.md README.md: Add missing space in pkg bootstrap [-f] 2024-12-04 16:03:01 +01:00
TODO.md TODO: add an entry about piping to pager 2021-08-18 11:23:35 +02:00
UndefinedBehaviour.suppress.in Fix external/picosat undefined behaviour. 2024-12-03 08:44:24 +01:00

pkg - a package manager for FreeBSD

  • Sourcehut FreeBSD: builds.sr.ht status
  • Sourcehut Alpine: builds.sr.ht status
  • Sourcehut Debian: builds.sr.ht status
  • Github Actions: build

Table of Contents:

libpkg

pkg is built on top of libpkg, a new library to interface with the package registration backends. It abstracts package management details such as registration, remote repositories, package creation, updating, etc.

pkg package format

The pkg package format is a tar archive that may be raw or compressed using one of the following algorithms: gz, bzip2, zstd, or xz. The default compression algorithm is zstd.

The tar archive itself is composed of two types of elements:

  • the special files at the beginning of the archive, starting with a "+"
  • the data.

Installing packages

pkg can install a package archive from the local disk, remote HTTP server or remote SSH server.

Pkg bootstrap

All supported versions of FreeBSD now contain /usr/sbin/pkg a.k.a pkg(7). This is a small placeholder that has just the minimum functionality required to install the real pkg(8).

To use, simply run any pkg(8) command line. pkg(7) will intercept the command, and if you confirm that is your intention, download the pkg(8) tarball, install pkg(8) from it, bootstrap the local package database and then proceed to run the command you originally requested.

More recent versions of pkg(7) understand pkg -N as a test to see if pkg(8) is installed without triggering the installation, and conversely, pkg bootstrap [-f] to install pkg(8) (or force it to be reinstalled) without performing any other actions.

Additional resources

To contact us, you can find us in the #pkg channel on Libera Chat IRC Network.

If you hit a bug when using pkg, you can always submit an issue in the pkg issue tracker.