Currently Available: Need a skilled Software Developer for your next project?
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.

What I'm building

Delegate tasks. Get software.

Give Vroni a GitHub issue, bug report, spec, or rough idea. It reads the repo, plans the change, writes code, runs checks, and works toward a review-ready pull request.

Take a look at vroni.com

Subscribe to my newsletter

Get new posts when I publish them.

I respect your privacy. Unsubscribe at any time.

Leave a Reply

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