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 full-upgrade can remove packages that apt upgrade never removes

Apt
~/tips/tip-apt-full-upgrade-vs-upgrade

sudo apt upgrade

Lets apt install or remove packages to finish upgrades that are kept back.

People treat upgrade and full-upgrade as the same thing, but they handle dependency changes differently.

sudo apt upgrade
sudo apt full-upgrade

apt upgrade installs newer versions of what is already installed. It may pull in a new package when a dependency needs it, but it never removes a package. When an update would need a removal, that package stays on the old version and shows up as "kept back". apt full-upgrade does the same job and is allowed to remove installed packages to finish it. Read the list of packages to be removed before you answer yes, especially on a server with third-party repositories.

Further reading: apt 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