PKG-SET(8)
π PKG-SET(8) β like, the system manager's manual, but make it make sense
okay so bestie, you found pkg-set(8), the tool for modifying info in your installed package database. buckle up π
β¨ NAME β¨
pkg set β modify information in the installed database
like, you're literally editing the receipts of everything you've installed. no big deal. (it's a big deal.)
πΈ SYNOPSIS πΈ
pkg set [-a] [-A 0|1] [-n oldname:newname] [-o oldorigin:neworigin] [-p]
[-v 0|1] [-y] [-Cgix] pkg-name
pkg set [--all] [--automatic 0|1] [--change-name oldname:newname]
[--change-origin oldorigin:neworigin] [--partial] [--yes] [-v 0|1]
[--{case-sensitive,glob,case-insensitive,regex}] pkg-name
two flavours, short flags or the long ones, both iconic π
π¦ DESCRIPTION π¦
pkg set is the tool for modifying information concerning installed packages.
and yeah β pkg set should always be used with caution. fr fr. it's not a "just vibe and see what happens" command, it's a "know what you're doing" command. π«Ά
π OPTIONS π
here's everything pkg set supports, no gatekeeping:
-A 0|1,--automatic 0|1β set the automatic flag for the package:0is not automatic,1is automatic. this affects the operation of pkg-autoremove(8). π-a,--allβ match all installed packages. every single one of them.-C,--case-sensitiveβ make the standard or the regular expression (-x) matching against pkg-name case sensitive.-g,--globβ match pkg-name as a globbing expression.-i,--case-insensitiveβ make the standard or regular expression (-x) matching against pkg-name case insensitive. this is the default, unless modified by settingCASE_SENSITIVE_MATCHto true inpkg.conf.-n oldname:newname,--change-name oldname:newnameβ change the package name of a given dependency from oldname to newname.-o oldorigin:neworigin,--change-origin oldorigin:neworiginβ change the port origin of a given dependency from oldorigin to neworigin. this corresponds to the port directory that the package originated from. typically, this is only needed for upgrading a library or package that has MOVED or when the default version of a major port dependency changes.
DEPRECATED bestie, heads up. usually this will be explained in /usr/ports/UPDATING. also see pkg-updating(8) and βEXAMPLESβ. π
-p,--partialβ turn the-oor--noptions from exact match renames into substring search in replace in all installed packages.-x,--regexβ match pkg-name as a regular expression according to the "modern" or "extended" syntax of re_format(7).-v 0|1,--vital 0|1β set or unset the "vital" flag on the target package(s). set to0to disable the "vital" flag, and1to enable it.-y,--yesβ assume yes rather than asking for confirmation before modifying package information. no take-backs, no pop-up, just send it. π
and if neither the -g nor -x options are used, the default is to match pkg-name exactly. no fuzzy vibes, exact only. π―
π FILES π
see pkg.conf(5). that's the whole section, she's short and mysterious π
π₯ EXAMPLES π₯
change a package from automatic to non-automatic, which will prevent autoremove from removing it:
% pkg set -A 0 perl-5.14
change a package from non-automatic to automatic, which will make autoremove allow it be removed once nothing depends on it:
% pkg set -A 1 perl-5.14
rename all the php83- packages into php84- packages in order to prepare for an upgrade:
% pkg set -p -n php83:php84
see how the last one used -p? that's the partial matching doing the heavy lifting. slay. β¨
π ENVIRONMENT π
the following environment variables affect the execution of pkg set. see pkg.conf(5) for further description.
CASE_SENSITIVE_MATCH
one variable, one queen π
π SEE ALSO π
pkg_create(3), pkg_printf(3), pkg_repo_create(3), pkg_repos(3), pkg-keywords(5), pkg-lua-script(5), pkg-repository(5), pkg-script(5), pkg-triggers(5), pkg.conf(5), pkg(8), pkg-add(8), pkg-alias(8), pkg-annotate(8), pkg-audit(8), pkg-autoremove(8), pkg-check(8), pkg-clean(8), pkg-config(8), pkg-create(8), pkg-delete(8), pkg-fetch(8), pkg-help(8), pkg-info(8), pkg-install(8), pkg-key(8), pkg-lock(8), pkg-plugins(8), pkg-query(8), pkg-register(8), pkg-repo(8), pkg-repositories(8), pkg-rquery(8), pkg-search(8), pkg-shell(8), pkg-shlib(8), pkg-ssh(8), pkg-stats(8), pkg-triggers(8), pkg-unregister(8), pkg-update(8), pkg-updating(8), pkg-upgrade(8), pkg-version(8), pkg-which(8)
like a whole friend group honestly π«Ά
that's the page, bestie. go forth and pkg set responsibly π
this lil number came from the Debian build of the page β source Debian, dated August 27, 2025 β and yeah, that's the whole sign-off. mwah. π
π¦ where this page comes from
- nixos 26.05: pkg 2.7.5
- nixpkgs unstable: pkg 2.7.5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms