21

Executing sudo apt update ended with

Reading package lists... Done
Building dependency tree       
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.

Executing apt list --upgradable gave me

Listing... Done
onionshare/bionic,bionic 2.2.ppa1-1 all [upgradable from: 2.1-1]
ring-all/unknown 20190927.2.c2af011~dfsg1-1 amd64 [upgradable from: 20190629.2.c07ef23~dfsg1-1]

But executing sudo apt upgrade does not upgrade the upgradable packages:

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.
  1. Why is that? Unmet dependencies possibly?
  2. Can I (manually) upgrade the listed packages, and if so: how?

Update: See this pastebin for a full transcript.

4
  • 1
    Is there anything like kept back in the output?
    – Kulfy
    Oct 18, 2019 at 11:32
  • No, that's pretty much all of it. I have added to the post a link to a pastebin with a full transcript.
    – marianoju
    Oct 18, 2019 at 18:08
  • 3
    What happens if you run sudo apt full-upgrade instead?
    – pomsky
    Oct 19, 2019 at 5:27
  • @pomsky Same as with sudo apt upgrade
    – marianoju
    Oct 20, 2019 at 11:01

3 Answers 3

10

You can run the command line below for upgrade all upgradable packages and their dependencies:

sudo apt-get dist-upgrade
1
  • 3
    The command sudo apt-get dist-upgrade does not upgrade all upgradable packages and their dependencies. Output for me is: Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages have been kept back: ring-all 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. (Same as sudo apt upgrade and sudo apt full-upgrade)
    – marianoju
    Apr 10, 2020 at 9:59
10

In this case “upgradable packages” are actually not upgradable because they have unmet dependencies.

To reproduce: try to update the specific packages in question (see How To Update A Specific Package In Ubuntu) by executing sudo apt-get install --only-upgrade <packagename>. If any package has unmet dependencies, the upgrade will fail due to

E: Unable to correct problems, you have held broken packages.

Upgrading these packages would require to resolve the unmet dependencies. Information on that can be found in the answer to “How do I resolve unmet dependencies after adding a PPA?” and “Fixing Unable to correct problems, you have held broken packages”.

1
  • 1
    The underlying issue of the not installable dependency python3-flask-httpauth has been discussed on GitHub (see #1052).
    – marianoju
    Jul 31, 2020 at 20:43
2

I suggest running:

sudo apt-get upgrade

This worked for me. It will tell you how many packages it upgraded, how many new ones were installed, how many were deleted, and how many were not upgraded (kept back).

I had packages that were kept back, so after reading this post, which provides multiple solutions, I ran the following to install the packages that were kept back:

sudo apt-get --with-new-pkgs upgrade

This will also include which packages are no longer needed and could be removed. Per the output's instructions, I ran the following to remove them:

sudo apt autoremove

Lastly I ran the first code again, just to make sure all was clear and would get the output "0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded."

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.