4

I get this message:

$ sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

How do I find out which packages are not upgraded, and why?

On many similar outputs like this, it additionally prints sth like The following packages have been kept back:, but not in my case here.

Additionally:

$ sudo apt list --upgradable
Listing... Done

Additionally:

sudo apt-get dist-upgrade --dry-run
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

and:

sudo apt-get full-upgrade --dry-run
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

apt-cache policy log here.

Albert
  • 2,577
  • What version of Ubuntu? Did you do an update before you tried to do an upgrade? – David Sep 30 '21 at 11:38
  • @David: 20.04. And yes. But would that be related to the question? I just ask about how to find out what packages it refers to. – Albert Sep 30 '21 at 11:48
  • 1
    Add the output of apt-get dist-upgrade --dry-run, please – muru Sep 30 '21 at 12:37
  • There are packages that are not upgraded with a apt upgrade; the man apt will explain why (key is the bit for "full-upgrade performs the function of upgrade but will remove* currently installed packages if this is needed to upgrade the system as a whole.*" which is the command that upgrades all packages. – guiverc Sep 30 '21 at 12:58
  • @guiverc How can I find out which packages? – Albert Sep 30 '21 at 14:17
  • can you show apt-cache policy please? – nobody Oct 02 '21 at 10:13
  • I forgot Look to your apt-cache policy you pinnt 2 packages with apt pinning priority - 1 there I would look – nobody Oct 17 '21 at 22:43

1 Answers1

1

The two packages that will not be upgraded are the ones that are pinned, to prevent them from being upgraded.

From the end of the apt-cache policy output:

Pinned packages:
     nsight-compute -> 10.1.243-3 with priority -1
     nsight-systems -> 10.1.243-3 with priority -1
Organic Marble
  • 23,641
  • 15
  • 70
  • 122
  • This sounds like it is the problem. But what does this mean? How have they been pinned? Why are they pinned? Should I keep it this way or unpin it? How do I unpin? What are the consequences? – Albert Feb 01 '22 at 16:14
  • My original question here is also a bit more generic, i.e. how to figure out which packages are referred to when apt writes "... not upgraded". Or does it always mean there are pinned packages? Or could it mean sth else as well? This is my main question here. How to find out. – Albert Feb 01 '22 at 16:16
  • @Albert AFAIK this has to be manually done. It is done specifically to keep a package from being updated. The only packages I have pinned on my system is snapd to keep it from being installed. To do that, I had to go into /etc/apt/preferences.d and make a file that set the pin-priority negative. So to find this on your system, go into /etc/apt and grep for nsight-compute. I can't answer why it was done...because the owner of the system did it. If you are not the owner of the system, maybe you can ask them? – Organic Marble Feb 01 '22 at 16:19
  • I'm the owner of the system but I don't remember that I did sth like that. Or rather I'm actually pretty sure I did not. – Albert Feb 01 '22 at 16:33
  • @Albert did you find nsight-compute referenced in \etc\apt somewhere? Now I'm curious. I guess there's no reason some program couldn't set a pin. I don't even know what nsight-compute is. – Organic Marble Feb 01 '22 at 16:40