How to Uninstall a Linux Distro in WSL

If you want to remove a Linux distro from your Windows Subsystem for Linux (WSL) installation, you can use the wsl --unregister <distro-name> command to unregister it.

This blog post shows a quick demo of uninstalling a WSL distro. Keep in mind that unregistering a distro will permanently delete all data, setting and software associated with it. If you want to reinstall you can do so using the Microsoft Store.

Uninstalling a WSL Distro

1. First, we’ll run the following command to check our installed WSL distributions:

# show list of wsl distros
wsl -l -v

2. Take the name from this command and uninstall it by running this:

# unregister a wsl distro
wsl --unregister <distro_name>
wsl --unregister command example

In the example above we have successfully uninstalled the Ubuntu-20.04 distro.

Hope this was useful, check out the WSL tag link below for more tips like this one!


Recent Posts
Categories
Tags

Always On Availability Groups (AAG) (4) AWS (4) AWS Redshift (6) Certificates & Encryption (3) Change Data Capture (CDC) (2) Database Admin (72) Database Backups & Recovery (14) Database Mirroring (2) Deleting Data (1) Error Messages (5) Git Commands (6) Importing & Exporting Data (2) Linked Servers (3) Linux Admin (2) Logging & Monitoring (1) Measuring Databases (10) Microsoft Patching (2) MySQL (4) Postgres (6) PowerShell Scripts (1) SQL Server Agent (5) SQL Server Database Files (1) SQL Server Data Types (2) SQL Server Management Studio (SSMS) (15) SQL Server Network Connectivity (3) SQL Server on Linux (1) SQL Server Patching (2) SQL Server Performance (6) SQL Server Permissions (2) SQL Server Processes (SPIDs) (7) SQL Server Replication (2) SQL Server Scripts (13) Windows Admin (21) Windows Authentication (2) Windows Automation (1) Windows Events (2) Windows Firewall (4) Windows Subsystem for Linux (WSL) (18)