User Tools

Site Tools


ubuntu:aptitude:hold_a_package

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

ubuntu:aptitude:hold_a_package [2023/06/18 16:03] – created peterubuntu:aptitude:hold_a_package [2023/06/18 16:07] (current) peter
Line 23: Line 23:
 sudo aptitude unhold [package name] sudo aptitude unhold [package name]
 sudo aptitude unhold nginx sudo aptitude unhold nginx
 +</code>
 +
 +----
 +
 +===== Forbid a package from being upgraded to a particular version, while allowing automatic upgrades to future versions =====
 +
 +This is useful for example to avoid a known broken version of a package such as grub:
 +
 +<code bash>
 +sudo aptitude forbid-version {pkg}={version}
 +sudo aptitude forbid-version bash=5.0-6ubuntu1.1
 +</code>
 +
 +When you try to upgrade package using the aptitude command you will see message:
 +
 +<code bash>
 +sudo aptitude upgrade
 +</code>
 +
 +The following packages will be upgraded:
 +
 +<code>
 +  libcomerr2 libx11-data 
 +2 packages upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
 +....
 </code> </code>
ubuntu/aptitude/hold_a_package.1687104220.txt.gz · Last modified: 2023/06/18 16:03 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki