ubuntu:aptitude:hold_a_package
Differences
This shows you the differences between two versions of the page.
ubuntu:aptitude:hold_a_package [2023/06/18 16:03] – created peter | ubuntu: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 | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== 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 | ||
+ | </ | ||
+ | |||
+ | When you try to upgrade package using the aptitude command you will see message: | ||
+ | |||
+ | <code bash> | ||
+ | sudo aptitude upgrade | ||
+ | </ | ||
+ | |||
+ | The following packages will be upgraded: | ||
+ | |||
+ | < | ||
+ | libcomerr2 libx11-data | ||
+ | 2 packages upgraded, 0 newly installed, 0 to remove and 1 not upgraded. | ||
+ | .... | ||
</ | </ |
ubuntu/aptitude/hold_a_package.1687104220.txt.gz · Last modified: 2023/06/18 16:03 by peter