Support for APT (Advanced Packaging Tool)
Members
Return the latest version of the named package available for upgrade or installation via the available apt repository
CLI Example:
salt '*' pkg.available_version <package name>
Install the passed package
Return a dict containing the new package names and versions:
{'<package>': {'old': '<old-version>',
'new': '<new-version>']}
CLI Example:
salt '*' pkg.install <package name>
List the packages currently installed in a dict:
{'<package_name>': '<version>'}
External dependencies:
Virtual package resolution requires aptitude.
Without aptitude virtual packages will be reported as not installed.
CLI Example:
salt '*' pkg.list_pkgs
salt '*' pkg.list_pkgs httpd
List all available package upgrades.
CLI Example:
salt '*' pkg.list_upgrades
Remove a package via apt-get purge along with all configuration files and unused dependencies.
Returns a list containing the names of the removed packages
CLI Example:
salt '*' pkg.purge <package name>
Updates the APT database to latest packages based upon repositories
Returns a dict:
{'<database name>': Bool}
CLI Example:
salt '*' pkg.refresh_db
Remove a single package via apt-get remove
Returns a list containing the names of the removed packages.
CLI Example:
salt '*' pkg.remove <package name>
Upgrades all packages via apt-get dist-upgrade
Returns a list of dicts containing the package names, and the new and old versions:
[
{'<package>': {'old': '<old-version>',
'new': '<new-version>']
}',
...
]
CLI Example:
salt '*' pkg.upgrade