I have many Ubuntu Desktop
22.04 instances installed through either direct installation or VirtualBox. All of them installed in the same way. Sometimes and for few of them happens the following:
#1
sudo apt update
...
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
26 packages can be upgraded. Run 'apt list --upgradable' to see them.
#2
sudo apt upgrade
...
#3
sudo apt autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded. <-----
#4
sudo apt autoclean
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
#5
sudo apt clean
Observe in #3 the following part:
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded
Question
- Why
apt
can't upgrade some packages?
If is re-executed almost the same process happens the following (Observe #2 because is new and #3 because has more details)
#1
sudo apt update
...
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.
#2
apt list --upgradable
Listing... Done
libsmbclient/jammy-updates 2:4.15.13+dfsg-0ubuntu1.6 amd64 [upgradable from: 2:4.15.13+dfsg-0ubuntu1.5]
libwbclient0/jammy-updates 2:4.15.13+dfsg-0ubuntu1.6 amd64 [upgradable from: 2:4.15.13+dfsg-0ubuntu1.5]
samba-libs/jammy-updates 2:4.15.13+dfsg-0ubuntu1.6 amd64 [upgradable from: 2:4.15.13+dfsg-0ubuntu1.5]
#3
sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
Get more security updates through Ubuntu Pro with 'esm-apps' enabled:
imagemagick libopenexr25 libmagickcore-6.q16-6-extra libmagickwand-6.q16-6
imagemagick-6.q16 libmagickcore-6.q16-6 imagemagick-6-common
Learn more about Ubuntu Pro at https://ubuntu.com/pro
The following packages have been kept back:
libsmbclient libwbclient0 samba-libs
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded. <---
#4
sudo apt autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
#5
sudo apt autoclean
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
#6
sudo apt clean
Note in others instances not always appears the following part
Get more security updates through Ubuntu Pro with 'esm-apps' enabled:
Therefore it happens randomly and even in few instances of Ubuntu Server
. If my memory does not fail me, I had this experience for Ubuntu 18.04 and 20.04 too.
man
page for clues; there are cases (esp. on alpha or beta, but also when some sources are added) whenapt full-upgrade
orapt dist-upgrade
is needed to be run .. ie. from my release "full-upgrade performs the function of upgrade but will remove currently installed packages if this is needed to upgrade the system as a whole" whereapt upgrade
will leave those upgrades before so you can decide yourself when you using theapt full-upgrade
command. Other reasons include ESP/Pro related packages (need ESM/Pro to be enabled) OR phased updates too. – guiverc Mar 30 '24 at 23:06