0

I ran apt-get upgrade and found a kept back package.

bitnami@ip-xxxxx-xx-xxx:/etc/apt/sources.list.d$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  mongodb-org-tools
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

Following this link and after some basic understanding of what "--with-new-pkgs-upgrade" does, I ran the following:

bitnami@ip-xxxxx-xx-xxx:/etc/apt/sources.list.d$ sudo apt-get --with-new-pkgs upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

However, when I rerun the regular "apt-get upgrade" again, I still see the kept back packages listed.

bitnami@ip-xxxxx-xx-xxx:/etc/apt/sources.list.d$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  mongodb-org-tools
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

The link I'm referring to also provides a troubleshooting step in one of the comments:

I ran the step to just find it doesn't do anything and reports 0 not upgraded:

sudo apt-get install mongodb-org-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  mongodb-org-tools
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I still see the kept back packages. Is there any benefit of "--with-new-pkgs"? How do solve the issue with kept-back packages in this case?

  • Depends upon the the reason why the package was kept back. "--with-new-pkgs" is rarely the reason, though it it does occasionally happen. The two main reasons are 1) Package name change (like a kernel bump; solve by using sudo apt full-upgrade) or 2) A version conflict ("Foo 1.1, but 1.2.is already installed"), usually from a non-Ubuntu source, that must be solved. – user535733 Jun 17 '20 at 18:55
  • Thank you. I understand reason 1, but with reason 2 how can we resolve a conflict with a package installed from a non-ubuntu source? How can we even determine that I is the issue? by going to the source list? I thought the apt usually tells me if there is a conflict but not sure why it doesn't state that now. – Harish Chennamsetty Jun 18 '20 at 13:09
  • If apt isn't complaining, then there may be no conflict. Your 3rd set of output indicates no problems and no kept-back packages. Your comment "I still see the kept back packages" indicates that you might be looking at something different. If so, edit your question to show us. – user535733 Jun 18 '20 at 15:46

0 Answers0