Categories
Linux

Solved: Ubuntu Upgrade Failure on WSL2

When attempting to upgrade Ubuntu (in my case from 18.04 LTS to 20.04 LTS) on Windows Subsystem for Linux 2 (WSL2), the process may abort without clear error messages. The resolution to this problem is the removal of snapd.

Issue

The do-release-upgrade command aborts the upgrade process, reverting to the original system state without completing the upgrade. The process stalls after attempting to read package lists and build dependency trees, displaying a message indicating that it is "Restoring original system state" and then "Aborting".

Logs

The /var/log/dist-upgrade/main.log may not show explicit errors but indicates an unexpected "abort called".

Resolution

  1. Remove snapd:
    To resolve the issue, remove snapd from the system:

    sudo apt-get purge snapd
    
  2. Retry Upgrade:
    After removing snapd, rerun the upgrade command:

    sudo do-release-upgrade
    

    This should now proceed without the previous interruption.

Leave a Reply

Your email address will not be published. Required fields are marked *