I tried to upgrade my Ubuntu WSL on Windows 10 to later Ubuntu as it had older 18.04 currently. But it failed with aborting error without additional information. I found online that others had removed snapd
which was preventing the upgrade. I also removed snapd
and then the upgrade succeeded. The problem and abort error messages are described in these AU posts:
do-release-upgrade silently fails upgrading from 18.04 LTS to 20.04 LTS in WSL
Can't upgrade to Ubuntu 21.04 : "Restoring original system state. Aborting"
Fetched 0 B in 0s (0 B/s) Reading package lists... Done Building dependency tree Reading state information... Done [LONG PAUSE]
Restoring original system state
Aborting Reading package lists... Done Building dependency tree Reading state information... Done === Command terminated with exit status 1 (Thu Aug 5 02:10:50 2021) ===
I did a full update before the upgrade attempt.
sudo apt update && sudo apt upgrade
then a reboot
and then do-release-upgrade
Perhaps this could be updated in Ubuntu to handle this error also?
Is this a problem only in older 18.04 or is the same procedure also needed in 20.04 and later upgrades?
Is it recommended to add snapd
back after each upgrade?
I found this information afterwards online. Would this have resolved the upgrade issue also instead of removing snapd
?
sudo -S apt-mark hold procps strace sudo
sudo -S env RELEASE_UPGRADER_NO_SCREEN=1 do-release-upgrade