Debian – Can a Debian package’s Priority field be used for selection for install

aptdebianpackage-management

In a Debian package's control file, there is a Priority field which can be set to one of:

  • required
  • important
  • standard
  • optional
  • extra

APT pinning can be used to specify priorities for packages from different sources but this setting is local to the computer which is actually updating and not distributed via the repository.

Can the package's priority be used by APT for selection for install? E.g. can you pass a parameter to apt-get dist-upgrade to only upgrade required packages?

If not, what is this field used for? Does it link in with the APT pinning?

Best Answer

The Policy Manual link you provided reads:

This information is used by the Debian package management tools to separate high-priority packages from less-important packages.

This means several things:

  • the package management tools require extra confirmation before removing required packages,
  • aptitude lets you search or limit the display based on priority (the latter makes it possible to operate on packages based on priority, try l then type ?priority(required) for example),
  • other package managers probably have similar functionality.
Related Question