↑ ↓ select, Enter open, Esc close

Hold a package at its current version (apt-mark hold)

Caution: This command changes the system. Understand what it does before you run it.

Adjust the values, the command updates live
root@server
apt-mark hold mariadb-server

Marks a package as held so apt upgrade and unattended-upgrades no longer update it. Useful when a new version has a known problem or an update should only be installed after testing. Held packages are shown as kept back during apt upgrade.

Note: On Plesk servers, do not hold Plesk packages (plesk-*, psa-*, sw-*) or services managed by Plesk without checking first, as this can block Plesk updates and repairs. Held packages also stop receiving security updates.

Also searched as

  • apt hold package version
  • exclude package from apt upgrade
  • prevent package from updating debian
  • freeze package version

Related one-liners

All in Debian and APT

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.