Trouble upgrading ubuntu droplet

Posted August 14, 2021 158 views
Ubuntu 16.04

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!

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.

Submit an Answer
1 answer

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.