Skip to content

Conversation

@akorn
Copy link

@akorn akorn commented Aug 12, 2025

Originally, the script used the output of apt-get upgrade to obtain a list
of upgradable packages, but this can be very off, as upgrade won't install
upgrades with new dependencies, so these would not be counted. For example,
one of my bookworm (oldstable) systems that would now be upgraded to trixie
lists an order of magnitude fewer packages than apt list --upgradable
(23 vs 216).

apt list --upgradable is the command that actually tells you which packages
have newer versions in the configured repositories (with dependencies that
are satisfiable).

This also speeds up the query considerably:

time apt-get -qq -s upgrade takes ~8s on one system, while
time apt list --upgradable takes less than 1s on the same system.

apt list --upgradable has been available since Debian 8 (codename "jessie"),
released in April 2015.

Originally, the script used the output of `apt-get upgrade` to obtain a list
of upgradable packages, but this can be very off, as upgrade won't install
upgrades with new dependencies, so these would not be counted. For example,
one of my bookworm (oldstable) systems that would now be upgraded to trixie
lists an order of magnitude fewer packages than `apt list --upgradable`
(23 vs 216).

`apt list --upgradable` is the command that actually tells you which packages
have newer versions in the configured repositories (with dependencies that
are satisfiable).

This also speeds up the query considerably:

`time apt-get -qq -s upgrade` takes ~8s on one system, while
`time apt list --upgradable` takes less than 1s on the same system.

`apt list --upgradable` has been available since Debian 8 (codename "jessie"),
released in April 2015.
@CLAassistant
Copy link

CLAassistant commented Aug 12, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants