14

I have tried many different solutions found around this and other websites, such as

sudo apt update && sudo apt upgrade
sudo apt list --upgradeable
sudo apt full-upgrade
sudo apt dist-upgrade

and no information nor update of the package is displayed. I also tried

aptitude update

and checked the log and no information about the package is displayed.

Any ideas on how to identify this package?

My guess at this point, is that it might have something to do with the sources.list file. Any comments on this?

I have Linux Mint with the latest distribution Ulyana / Focal.

Thank you very much!

learning_dude
  • 243
  • 1
  • 2
  • 6

3 Answers3

12

apt upgrade will tell you what it would like to do, including package upgrades; and this will include a list of packages it won’t upgrade:

$ sudo apt upgrade -o APT::Get::Show-Upgraded=true
The following packages were automatically installed and are no longer required:
  [any packages which could be auto-removed]
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  [any packages which will be installed]
The following packages have been kept back:
  [any packages which are upgradeable but won’t be upgraded]
The following packages will be upgraded:
  [any packages which will be upgraded]
NN upgraded, NN newly installed, NN to remove and NN not upgraded.
Need to get ... of archives.
After this operation, ... of additional disk space will be used.
Do you want to continue? [Y/n]

(replacing NN with the four different values reflecting the packages listed above).

If this still doesn’t show anything for you, perhaps the non-upgraded package is locally installed (but then, apt presumably wouldn’t want to upgrade it...). A good tool to investigate this is apt-show-versions:

sudo apt install apt-show-versions

Then run

apt-show-versions | grep "No available version in archive"

to see packages which aren’t available in the configured repositories, and

apt-show-versions | grep upgradeable

to see which packages are upgradeable (regardless of whether apt would upgrade them).

You can usually find out more about why the package is not being upgraded by running apt install with the package name. If its upgrade would cause another package to be removed, upgrade would skip it, but full-upgrade would upgrade it.

Yet another possibility is that the upgrade candidate is blocked; on Linux Mint in particular, this can happen with snapd, which is disabled by default by the /etc/apt/preferences.d/nosnap.pref configuration file.

Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164
7

apt will usually do this if upgrading a package requires the removal of another package. You can apply upgrades like these with

apt dist-upgrade

apt will ask you whether you want to actually update the packages, so you can also use this for listing the packages in the first place.

Maya
  • 378
  • 2
  • 9
  • Hi, thanks for your message. The output of `apt dist-upgrade` shows only what is displayed on the title of my question. By only typing `apt` the help is displayed, so I am not sure what you mean with your last sentence. In either case, I have no information about the package that is not upgraded. – learning_dude Oct 21 '20 at 15:01
6

In my case, the same error was due to the presence of the file /etc/apt/preferences.d/nosnap.pref which is installed by ubuntu-system-adjustments Linux Mint package to disable the installation of snapd.

Commenting out the content of nosnap.pref or removing this file solves the issue.

AlexD
  • 1,088
  • 1
  • 10
  • 14