Package

The package resource manages system packages. Specify whether the package should be present, absent, at the latest version, or at a specific version.

Warning

Use real package names, not virtual names, aliases, or group names.

- package:
    - zsh:
        ensure: "5.9"
ccm ensure package zsh 5.9
{
  "protocol": "io.choria.ccm.v1.resource.ensure.request",
  "type": "package",
  "properties": {
    "name": "zsh",
    "ensure": "5.9"
  }
}

Ensure Values

ValueDescription
presentThe package must be installed
latestThe package must be installed at latest version
absentThe package must not be installed
<version>The package must be installed at this version

Properties

PropertyDescription
namePackage name
ensureDesired state or version
providerForce a specific provider (dnf, apt)

Provider Notes

APT (Debian/Ubuntu)

The APT provider preserves existing configuration files during package installation and upgrades. When a package is upgraded and the maintainer has provided a new version of a configuration file, the existing file is kept (--force-confold behavior).

Packages in a partially installed or config-files state (removed but configuration remains) are treated as absent. Reinstalling such packages will preserve the existing configuration files.

Note

The provider will not run apt update before installing a package. Use an exec resource to update the package index if necessary.

The provider runs non-interactively and suppresses prompts from apt-listbugs and apt-listchanges.