27

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
2
  • 1
    systemct status snapd.service Is it running?
    – nobody
    Jun 6, 2021 at 10:43
  • 1
    To be honest, I've checked another thread that suggested to do sudo apt-get purge snapd and it worked !
    – Funeoz
    Jun 6, 2021 at 10:44

3 Answers 3

58

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

5
  • 10
    This also works when using WSL2 and ubuntu imported as rootfs! Sep 17, 2021 at 23:14
  • 7
    Worked for me. This was blocking me from upgrading my WSL distro from Ubuntu 18.04 to 20.04
    – Inigo
    Oct 3, 2021 at 15:25
  • 1
    Thank you for this answer, that was exactly the solution that I needed. Mar 10, 2023 at 23:41
  • Worked for me as well Apr 14, 2023 at 17:02
  • I had 'screen' installed too, and had to purge that too. (And reinstall after) Feb 21 at 21:16
10

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!

1
  • 2
    ftw @ wsl2, thx Nov 26, 2021 at 15:01
1

All I had to do was remove the screen application. Fortunately no need to remove snapd:

sudo apt purge screen

You must log in to answer this question.

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