2

I'm trying to upgrade my ubuntu box from 20.04 to 22.04 and getting the following error. Can anyone help me please

2022-09-07 12:13:11,901 WARNING Can't mark 'ubuntu-desktop' for upgrade (E:Unable to correct problems, you have held broken packages.)

Here is the full error log

2022-09-07 12:13:11,131 DEBUG openCache()
2022-09-07 12:13:11,270 DEBUG Comparing 5.15.0-43 with 
2022-09-07 12:13:11,271 DEBUG Comparing 5.15.0-46 with 5.15.0-43
2022-09-07 12:13:11,290 DEBUG /openCache(), new cache size 12090
2022-09-07 12:13:11,291 DEBUG need_server_mode(): run in 'desktop' mode, (because of pkg 'ubuntu-desktop')
2022-09-07 12:13:11,291 DEBUG quirks: running PreDistUpgradeCache
2022-09-07 12:13:11,291 DEBUG running Quirks.PreDistUpgradeCache
2022-09-07 12:13:11,534 DEBUG Running KeepInstalledSection rules
2022-09-07 12:13:11,599 DEBUG Kernel uname: '5.15.0-46-generic' 
2022-09-07 12:13:11,608 DEBUG nvidiaUpdate()
2022-09-07 12:13:11,775 INFO no old nvidia driver installed, installing no new
2022-09-07 12:13:11,775 DEBUG Removing 'gnome-cups-manager' (ubuntu-desktop PostUpgradeRemove rule)
2022-09-07 12:13:11,775 DEBUG Removing 'powermanagement-interface' (ubuntu-desktop PostUpgradeRemove rule)
2022-09-07 12:13:11,775 DEBUG Removing 'deskbar-applet' (ubuntu-desktop PostUpgradeRemove rule)
2022-09-07 12:13:11,775 DEBUG Removing 'nautilus-cd-burner' (ubuntu-desktop PostUpgradeRemove rule)
2022-09-07 12:13:11,775 DEBUG quirks: running PostDistUpgradeCache
2022-09-07 12:13:11,775 DEBUG running Quirks.PostDistUpgradeCache
2022-09-07 12:13:11,796 DEBUG Comparing 5.15.0-43 with 
2022-09-07 12:13:11,796 DEBUG Comparing 5.15.0-46 with 5.15.0-43
2022-09-07 12:13:11,796 DEBUG Comparing 5.15.0-47 with 5.15.0-46
2022-09-07 12:13:11,808 INFO installing linux metapackage: linux-generic
2022-09-07 12:13:11,808 DEBUG Installing 'linux-generic' (linux metapackage may have been accidentally uninstalled)
2022-09-07 12:13:11,825 DEBUG Marking 'ubuntu-desktop' for upgrade
2022-09-07 12:13:11,901 WARNING Can't mark 'ubuntu-desktop' for upgrade (E:Unable to correct problems, you have held broken packages.)
2022-09-07 12:13:11,914 DEBUG denylist expr 'update-manager$' matches 'update-manager'
2022-09-07 12:13:11,914 DEBUG The package 'update-manager' is marked for removal but it's in the removal deny list
2022-09-07 12:13:26,538 ERROR Dist-upgrade failed: 'The package 'update-manager' is marked for removal but it is in the removal deny list.'
2022-09-07 12:13:26,576 DEBUG abort called
2022-09-07 12:13:26,578 DEBUG openCache()
2022-09-07 12:13:27,352 DEBUG Comparing 5.15.0-43 with 
2022-09-07 12:13:27,352 DEBUG Comparing 5.15.0-46 with 5.15.0-43
2022-09-07 12:13:27,409 DEBUG /openCache(), new cache size 23600

Here is my /etc/apt/sources.list file

deb http://archive.ubuntu.com/ubuntu focal main restricted
deb http://security.ubuntu.com/ubuntu/ focal-security restricted main
deb http://archive.ubuntu.com/ubuntu focal-updates restricted main
deb http://archive.ubuntu.com/ubuntu focal-backports restricted main

1 Answers1

-1

Had this exact same problem when updating from 20.04 to 22.04

After trying a bunch of other things e.g. deleting external repositories, which didn't work, I tried this:

sudo apt remove ubuntu-desktop

Note this is a "meta" package that loads the rest of the desktop. If you remove the children you will lose the desktop. So ONLY remove ubuntu-desktop, nothing else.

After you have installed 22.04, then IMMEDIATELY do

sudo apt install ubuntu-desktop

If you don't and you accidentally do "apt autoremove" you will lose the desktop. And if that happens, you will have to reinstall all of this from Ubuntu server mode (i.e. only terminal available).

In my case, I lost ethernet (wired) connection in that mode. To fix it, I did this (see Ethernet device not managed)

# create file:
sudo nano /etc/NetworkManager/conf.d/10-globally-managed-devices.conf
# add two lines
[keyfile]
unmanaged-devices=none

Then rebooted. At that point I had an internet connection and install of ubuntu-desktop worked and it all came back up (so far).

Will this work for you? No idea. Note that if it failed I have to do a complete reinstall of Ubuntu and thereby lose all files, settings, etc.

JohnA
  • 119