Question

Trouble upgrading ubuntu droplet

I have a droplet that was on Ubuntu 16 and I logged in to do an upgrade. I think I got into a bad state. I tried to upgrade ubuntu once (do-release-upgrade) and I was following instructions here. It quit on me before getting very far (after the warning about ssh and downloading some packages). I tried re-running it again as well as running apt-get upgrade.

I’m not sure how I got to my current state but at the moment when I log into my droplet now it says “Welcome to Ubuntu 18.04.1 LTS” and if I run do-release-upgrade it quits after saying “Please install all available updates for your release before upgrading.”.

If I run apt-get upgrade it doesn’t upgrade anything. It notes that 108 packages were “held back”.

If I run apt-get dist-upgrade I see the following error:

Calculating upgrade... Error!
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 command-not-found : Depends: python3-commandnotfound (>= 0.3ubuntu7) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

I’m not really sure how to proceed at this point. Thanks in advance for any tips!


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @rysilva,

I’ve seen this issue on older versions of Ubuntu, not sure how you got up to there. Anyway, what I’ll suggest is try and do the following:

First, try with:

apt-get install python3-commandnotfound

If this doesn’t work, try upgrading it:

apt-get update python3-commandnotfound

If this again doesn’t work, try

sudo apt-get install command-not-found=0.3ubuntu12

Unfortunately, this as I said is a problem of older Ubuntu droplets. If the above don’t resolve the issues, I’ll suggest re-creating the droplet directly as 20.04 Ubuntu.