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 list --upgradable shows what is waiting before you upgrade

Apt
~/tips/tip-ubuntu-apt-list-upgradable

apt list --upgradable

Lists the packages that have a newer version available without installing anything.

I like to know what an upgrade is going to touch before I say yes to it. Most people run apt upgrade and read the list after the fact, when the prompt is already waiting for a Y.

There is a calmer way. Refresh the package lists first, then ask apt what it would change:

sudo apt update
apt list --upgradable

Every line is one package with the new version, the version you have now, and the pocket it comes from, such as noble-updates or noble-security. Nothing gets installed. You just look.

I would run it on a server I care about, then decide: upgrade now, wait, or hold one package back. If a kernel or something like openssh is in the list, I would plan a quiet moment first. If it is a handful of small libraries, I would go ahead.

One caveat. The list is only as fresh as your last apt update. Skip that step and you are looking at yesterday’s news. The command also does not look at snaps, which have their own updater. For those, snap refresh --list is the matching question.

Further reading: apt(8) man page (Ubuntu 24.04), On this site: apt autoremove –purge also deletes the leftover config files, On this site: apt changelog shows why a package wants to update

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