Werk #18923: Agent bakery .deb packages: Don't clean up /var/lib/check_mk_agent
| Component | Checks & agents | ||
| Title | Agent bakery .deb packages: Don't clean up /var/lib/check_mk_agent | ||
| Date | Dec 10, 2025 | ||
| Level | Trivial Change | ||
| Class | Bug Fix | ||
| Compatibility | Incompatible - Manual interaction might be required | ||
| Checkmk versions & editions |
|
Agent bakery dpkg (.deb) packages for Linux previously removed the directory /var/lib/check_mk_agent on uninstallation.
With this Werk, we stop removing this directory explicitly.
Notes:
- Only bakery dpkg packages deleted this directory. All other packages, including the prepackaged dpkg package that comes with the Checkmk installation, left it behind.
- This only ever affected the default
/var/lib/check_mk_agentdirectory. If the var directory was configured to some non-standard path with the Installation paths for agent files (Linux, UNIX) (deprecated) ruleset, it never was deleted explicitly on uninstallation. - It is common and expected behavior of dpkg packages to leave variable data behind. More precisely: If a directory is pre-existing before installation and a dpkg package would create it, it won't be deleted on uninstallation. If the dpkg package happens to create a directory, it will only remove it on uninstallation if all files and directories underneath already came with the package. Based on these rules, the
/var/lib/check_mk_agentdirectory is usually left behind on dpkg uninstallation.
If you currently rely on the automatic removal of the package's variable data, please update your workflow or scripts.