Support for pkgng
Install a package from either a local source or remote one
CLI Example:
salt '*' pkgng.add /tmp/package.txz
Audits installed packages against known vulnerabilities
CLI Example:
salt '*' pkgng.audit
Delete packages which were automatically installed as dependencies and are not required anymore.
CLI Example:
salt '*' pkgng.autoremove
salt '*' pkgng.autoremove dryrun=True
Export installed packages into yaml+mtree file
CLI Example:
salt '*' pkgng.backup /tmp/pkg
Sanity checks installed packages
Check for and install missing dependencies.
CLI Example:
salt '*' pkgng.check recompute=True
Recompute sizes and checksums of installed packages.
CLI Example:
salt '*' pkgng.check depends=True
Find invalid checksums for installed packages.
CLI Example:
salt '*' pkgng.check checksum=True
Cleans the local cache of fetched remote packages
CLI Example:
salt '*' pkgng.clean
Delete a package from the database and system
CLI Example:
salt '*' pkgng.delete <package name>
Deletes all installed packages from the system and empties the database. USE WITH CAUTION!
CLI Example:
salt '*' pkgng.delete all all_installed=True force=True
Forces packages to be removed despite leaving unresolved dependencies.
CLI Example:
salt '*' pkgng.delete <package name> force=True
Treat the package names as shell glob patterns.
CLI Example:
salt '*' pkgng.delete <package name> glob=True
Dry run mode. The list of packages to delete is always printed, but no packages are actually deleted.
CLI Example:
salt '*' pkgng.delete <package name> dryrun=True
Delete all packages that require the listed package as well.
CLI Example:
salt '*' pkgng.delete <package name> recurse=True
Treat the package names as regular expressions.
CLI Example:
salt '*' pkgng.delete <regular expression> regex=True
Treat the package names as extended regular expressions.
CLI Example:
salt '*' pkgng.delete <extended regular expression> pcre=True
Fetches remote packages
CLI Example:
salt '*' pkgng.fetch <package name>
Fetch all packages.
CLI Example:
salt '*' pkgng.fetch <package name> all=True
Quiet mode. Show less output.
CLI Example:
salt '*' pkgng.fetch <package name> quiet=True
Fetches packages from the given reponame if multiple repo support is enabled. See pkg.conf(5).
CLI Example:
salt '*' pkgng.fetch <package name> reponame=repo
Treat pkg_name as a shell glob pattern.
CLI Example:
salt '*' pkgng.fetch <package name> glob=True
Treat pkg_name as a regular expression.
CLI Example:
salt '*' pkgng.fetch <regular expression> regex=True
Treat pkg_name is an extended regular expression.
CLI Example:
salt '*' pkgng.fetch <extended regular expression> pcre=True
Skip updating the repository catalogues with pkg-update(8). Use the local cache only.
CLI Example:
salt '*' pkgng.fetch <package name> local=True
Fetch the package and its dependencies as well.
CLI Example:
salt '*' pkgng.fetch <package name> depends=True
Returns info on packages installed on system
CLI Example:
salt '*' pkgng.info
salt '*' pkgng.info sudo
Install package from repositories
CLI Example:
salt '*' pkgng.install <package name>
Mark the installed package as orphan. Will be automatically removed if no other packages depend on them. For more information please refer to pkg-autoremove(8).
CLI Example:
salt '*' pkgng.install <package name> orphan=True
Force the reinstallation of the package if already installed.
CLI Example:
salt '*' pkgng.install <package name> force=True
Treat the package names as shell glob patterns.
CLI Example:
salt '*' pkgng.install <package name> glob=True
Skip updating the repository catalogues with pkg-update(8). Use the locally cached copies only.
CLI Example:
salt '*' pkgng.install <package name> local=True
Dru-run mode. The list of changes to packages is always printed, but no changes are actually made.
CLI Example:
salt '*' pkgng.install <package name> dryrun=True
Force quiet output, except when dryrun is used, where pkg install will always show packages to be installed, upgraded or deleted.
CLI Example:
salt '*' pkgng.install <package name> quiet=True
When used with force, reinstalls any packages that require the given package.
CLI Example:
salt '*' pkgng.install <package name> require=True force=True
In multi-repo mode, override the pkg.conf ordering and only attempt to download packages from the named repository.
CLI Example:
salt '*' pkgng.install <package name> reponame=repo
Treat the package names as a regular expression
CLI Example:
salt '*' pkgng.install <regular expression> regex=True
Treat the package names as extended regular expressions.
CLI Example:
salt '*' pkgng.install <extended regular expression> pcre=True
The available version of the package in the repository
CLI Example:
salt '*' pkgng.latest_version <package name>
Return dict of uncommented global variables.
CLI Example:
salt '*' pkgng.parse_config
NOTE: not working properly right now
Reads archive created by pkg backup -d and recreates the database.
CLI Example:
salt '*' pkgng.restore /tmp/pkg
Searches in remote package repositories
CLI Example:
salt '*' pkgng.search pattern
Treat pattern as exact pattern.
CLI Example:
salt '*' pkgng.search pattern exact=True
Treat pattern as a shell glob pattern.
CLI Example:
salt '*' pkgng.search pattern glob=True
Treat pattern as a regular expression.
CLI Example:
salt '*' pkgng.search pattern regex=True
Treat pattern as an extended regular expression.
CLI Example:
salt '*' pkgng.search pattern pcre=True
Search for pattern in the package comment one-line description.
CLI Example:
salt '*' pkgng.search pattern comment=True
Search for pattern in the package description.
CLI Example:
salt '*' pkgng.search pattern desc=True
Displays full information about the matching packages.
CLI Example:
salt '*' pkgng.search pattern full=True
Displays the dependencies of pattern.
CLI Example:
salt '*' pkgng.search pattern depends=True
Displays the size of the package
CLI Example:
salt '*' pkgng.search pattern size=True
Be quiet. Prints only the requested information without displaying many hints.
CLI Example:
salt '*' pkgng.search pattern quiet=True
Displays pattern origin.
CLI Example:
salt '*' pkgng.search pattern origin=True
Displays the installation prefix for each package matching pattern.
CLI Example:
salt '*' pkgng.search pattern prefix=True
Return pkgng stats.
CLI Example:
salt '*' pkgng.stats
Display stats only for the local package database.
CLI Example:
salt '*' pkgng.stats local=True
Display stats only for the remote package database(s).
CLI Example:
salt '*' pkgng.stats remote=True
Refresh PACKAGESITE contents
CLI Example:
salt '*' pkgng.update
Force a full download of the repository catalogue without regard to the respective ages of the local and remote copies of the catalogue.
CLI Example:
salt '*' pkgng.update force=True
Updates remote package repo URL, PACKAGESITE var to be exact.
Must be using http://, ftp://, or https// protos
CLI Example:
salt '*' pkgng.update_package_site http://127.0.0.1/
' Displays UPDATING entries of software packages
CLI Example:
salt '*' pkgng.updating foo
Only entries newer than date are shown. Use a YYYYMMDD date format.
CLI Example:
salt '*' pkgng.updating foo filedate=20130101
Defines an alternative location of the UPDATING file.
CLI Example:
salt '*' pkgng.updating foo filename=/tmp/UPDATING
Upgrade all packages
CLI Example:
salt '*' pkgng.upgrade
Force reinstalling/upgrading the whole set of packages.
CLI Example:
salt '*' pkgng.upgrade force=True
Do not update the repository catalogues with pkg-update(8). A value of True here is equivalent to using the -U flag with pkg upgrade.
CLI Example:
salt '*' pkgng.update local=True
Dry-run mode: show what packages have updates available, but do not perform any upgrades. Repository catalogues will be updated as usual unless the local option is also given.
CLI Example:
salt '*' pkgng.update dryrun=True
Displays the current version of pkg
CLI Example:
salt '*' pkgng.version
Displays which package installed a specific file
CLI Example:
salt '*' pkgng.which <file name>
Shows the origin of the package instead of name-version.
CLI Example:
salt '*' pkgng.which <file name> origin=True
Quiet output.
CLI Example:
salt '*' pkgng.which <file name> quiet=True