1

I tried to upgrade from Ubuntu 18.04 to 20.04 on a dual booted system with Windows. There was some issue during upgrade and system rebooted. It restarted fine and then as I continued with the upgrade, it threw some error and the system got stuck. On reboot it keeps showing following screen.

boot screen after logo pops

I tried to go into recovery mode and fix broken packages and got following error.

dpkg fix broken packages error screen

I went to root shell prompt next - The apt update command runs fine. When I try to run apt upgrade, I get some unmet dependency error as follows

apt upgrade response

After that I tried to run apt --fix-broken install and it still gave the same error.

broken install fix response

I checked if there were any held packages and there were none.

2
  • 1
    The boot screen info suggests you have a bad connection to your internal drives. I would reseat your SATA connections if possible. The rest indicates that you have a failed upgrade and unfortunately recovering from an incomplete upgrade task like that is a bad thing because the system thinks you're on newer Ubuntu than you are. A clean install may be the only solution here, after you get your data you want to keep off to external media from a liveusb environment.
    – Thomas Ward
    Sep 29 at 14:52
  • You have essential packages from 18.04 that are still installed in 20.04 and causing unmet dependencies errors and held packages errors. A clean install may be the only solution here, after you get your data you want to keep off to external media from a live USB environment.
    – karel
    Sep 29 at 17:37

2 Answers 2

0

It seems that you have encountered a problem with unmet dependencies while trying to upgrade from Ubuntu 18.04 to 20.04. This can happen when some packages are not properly installed or configured, or when there are conflicts between different versions of packages.

I'm not sure but you can try

sudo apt remove ubuntu-advantage-tools

sudo apt install -f

sudo apt update

sudo apt upgrade

If you don't have internet connection type nmcli device to see available networks

Then type this command for connecting :

nmcli device wifi connect <SSID> password <password>

0

Some notes:

as @karel wrote easiest and short way is backing up date and make clean install.

For a little adventure you can try to end your release upgrade the debian way.

Preparation first.

Save your data and make a working install media (I would say with jammy). Replace your /etc/apt/sources.list and make a new one with following content

deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu focal partner

Move any file under /etc/apt/sources.list.d/ in a folder in your $HOME

When create following files: /etc/apt/preferences.d/focal.pref with content

Package: *
Pin: release n=focal
Pin-Priority: 1001

This forces apt to install packages from focal sources even a newer version from foreign sources are on your system; thats why it is so important to replace the sources.list und move any file under /etc/apt/sources.list.d/ away.

The next file to create

/etc/apt/apt.conf.d/99phased-update 
#deactivate phased-update.
APT::Get::Always-Include-Phased-Updates "1";

So this for me annoying feature is not disturbing us.

And the last file to create

/etc/apt/apt.conf.d/01keep-debs 
# Heruntergeladene Pakete behalten.
Binary::apt::APT::Keep-Downloaded-Packages "true";
APT::Get::Keep-Downloaded-Packages "true";
Binary::apt-get::APT::Keep-Downloaded-Packages "true";

So downloaded packages will stay in /var/cache/apt/archives/

sudo apt-get clean && sudo apt-get autoclean

This is removes any old and/or only partial downloaded packages in /var/cache/apt/archives Check out for free space and inodes

df -h;df -i

and free space and inodes if it is required

sudo apt-get update && sudo apt-get -f install && sudo apt-get upgrade

If here to many errors break up and install new. If not

sudo apt-get  dist-upgrade

Then you can remove /etc/apt/preferences.d/focal.pref and the 2 created files under /etc/apt/apt.conf.d/

Another note:

The one message on your image is strange:

An upgrade from focal to bionic is not supported with this tool.

Did you try somehow go back to bionic?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .