Forrest logo
back to the aptitude tool

aptitude:tldr:2b713

aptitude: Put an installed package on hold to prevent it from being automatically upgraded.
$ aptitude hold '?installed(${package})'
try on your machine

The command aptitude hold '?installed(${package})' is used to put a specific package on hold in the APT package management system.

Here's a breakdown of the command:

  • aptitude is the package management tool used in Debian-based systems to handle software installation, removal, and updates.
  • hold is the command used with aptitude to put a package on hold.
  • ' and " are used to delimit the command, ensuring that it is executed as a whole.
  • ?installed(${package}) is an expression that checks if a package is already installed. ${package} is a placeholder for the name of the package you want to put on hold.

By using this command, you can prevent a particular package from being upgraded or removed automatically when running system updates. It is useful when you want to maintain a specific version of a package for some reason, such as compatibility or stability.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the aptitude tool