Score:11

Can't upgrade to Ubuntu 21.04 : "Restoring original system state. Aborting"

us flag

I am trying to install Kubuntu 21.04 but I get this error that never happened before :

Restoring original system state

Aborting
Reading package lists... Done    
Building dependency tree          
Reading state information... Done

I tried to disable all the PPA, without success.

Here is the /var/log/dist-upgrade/main.log output :

2021-06-06 12:03:13,081 INFO Using config files '['./DistUpgrade.cfg', '/etc/update-manager/release-upgrades.d/ubuntu-advantage-upgrades.cfg']'
2021-06-06 12:03:13,082 INFO uname information: 'Linux Ideapad 5.8.0-55-generic #62-Ubuntu SMP Tue Jun 1 08:21:18 UTC 2021 x86_64'
2021-06-06 12:03:13,638 INFO apt version: '2.1.10ubuntu0.3'
2021-06-06 12:03:13,638 INFO python version: '3.8.6 (default, May 27 2021, 13:28:02) 
[GCC 10.2.0]'
2021-06-06 12:03:13,643 INFO release-upgrader version '21.04.12' started
2021-06-06 12:03:13,655 INFO locale: 'fr_FR' 'UTF-8'
2021-06-06 12:03:13,715 INFO screen could not be run
2021-06-06 12:03:13,766 DEBUG Using 'DistUpgradeViewText' view
2021-06-06 12:03:13,820 DEBUG enable dpkg --force-overwrite
2021-06-06 12:03:13,869 DEBUG creating statefile: '/var/log/dist-upgrade/apt-clone_system_state.tar.gz'
2021-06-06 12:03:18,043 DEBUG lsb-release: 'groovy'
2021-06-06 12:03:18,044 DEBUG _pythonSymlinkCheck run
2021-06-06 12:03:18,044 DEBUG openCache()
2021-06-06 12:03:18,045 DEBUG quirks: running PreCacheOpen
2021-06-06 12:03:18,045 DEBUG running Quirks.PreCacheOpen
2021-06-06 12:03:19,006 DEBUG Comparing 5.8.0-53 with 
2021-06-06 12:03:19,006 DEBUG Comparing 5.8.0-55 with 5.8.0-53
2021-06-06 12:03:19,112 DEBUG /openCache(), new cache size 68054
2021-06-06 12:03:19,113 DEBUG need_server_mode(): run in 'desktop' mode, (because of pkg 'kubuntu-desktop')
2021-06-06 12:03:19,113 DEBUG checkViewDepends()
2021-06-06 12:03:19,118 DEBUG running doUpdate() (showErrors=False)
2021-06-06 12:03:20,448 DEBUG openCache()
2021-06-06 12:03:21,438 DEBUG Comparing 5.8.0-53 with 
2021-06-06 12:03:21,438 DEBUG Comparing 5.8.0-55 with 5.8.0-53
2021-06-06 12:03:21,550 DEBUG /openCache(), new cache size 68054
2021-06-06 12:03:21,550 DEBUG doPostInitialUpdate
2021-06-06 12:03:21,550 DEBUG quirks: running hirsutePostInitialUpdate
2021-06-06 12:03:21,551 DEBUG running Quirks.hirsutePostInitialUpdate
2021-06-06 12:03:21,552 DEBUG checking for system vendor
2021-06-06 12:05:22,081 DEBUG abort called
2021-06-06 12:05:22,083 DEBUG openCache()
2021-06-06 12:05:23,193 DEBUG Comparing 5.8.0-53 with 
2021-06-06 12:05:23,193 DEBUG Comparing 5.8.0-55 with 5.8.0-53
2021-06-06 12:05:23,318 DEBUG /openCache(), new cache size 68054
nobody avatar
gh flag
`systemct status snapd.service` Is it running?
Funeoz avatar
us flag
To be honest, I've checked another thread that suggested to do `sudo apt-get purge snapd` and it worked !
Score:23
us flag

Removing snapd with sudo apt-get purge snapd was the solution.

JellyFilledNuts avatar
cn flag
This also works when using WSL2 and ubuntu imported as rootfs!
Inigo avatar
cn flag
Worked for me. This was blocking me from upgrading my WSL distro from Ubuntu 18.04 to 20.04
Morgan Blackthorne avatar
jp flag
Thank you for this answer, that was exactly the solution that I needed.
evantkchong avatar
ng flag
Worked for me as well
Score:5
pl flag

Was also affected by this. After removing snapd it still affected me. The last comment on this thread pointed the fix that worked for me https://github.com/microsoft/WSL/discussions/3489#discussioncomment-961901

I had to remove both snapd and screen!

1 - sudo apt-get purge snapd

2 - sudo apt-get purge screen

And then the upgrade ran smoothly. If it is still failing, you can cat /var/log/dist-upgrade/main.log to see what's causing you to fail!

ph flag
ftw @ wsl2, thx
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.