brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: apt-mark showhold lists the packages apt will leave alone

Apt
~/tips/tip-apt-mark-showhold-held-packages

apt-mark showhold

Lists the packages that are held back, so you can see why an upgrade skips them.

When an upgrade skips a package I expected to change, a hold is the first thing I check.

apt-mark showhold
sudo apt-mark unhold nginx

apt-mark hold marks a package as held back, which prevents it from being automatically installed, upgraded or removed. showhold prints every package that is on hold, and unhold cancels the hold so all actions work again. Holds survive reboots and normal upgrades, so a forgotten one can keep a security fix away for a long time.

Further reading: apt-mark manual page

More Apt tips sudo apt-mark minimize-manual apt list '~c' grep -E ' (install|upgrade|remove) ' /var/log/dpkg.log | tail -o Dpkg::Options::="–force-confold" upgrade sudo apt-get -d -y full-upgrade All Apt tips (42) All topics

Link