How to Uninstall Kali Linux from WSL on Windows 11
In this article
This guide walks you through completely removing Kali Linux from Windows Subsystem for Linux (WSL) on Windows 11. Whether you're freeing up disk space, switching to a different distro, or just cleaning house, these steps will unregister the distro and delete its files. This does not remove the WSL feature itself — only the Kali distribution. You'll need administrative access to Windows and a few minutes of time.
What You'll Need
- Windows 11 with WSL installed (any version).
- Administrator rights on your Windows account.
- Optional: a backup of any files you want to keep from inside Kali (because this deletes everything in that distro).
Step-by-Step
- Close any open Kali terminal windows. Make sure no WSL sessions are running to avoid file locks.
- Open PowerShell or Command Prompt as Administrator. Right-click the Start button and select "Terminal (Admin)" or "Windows PowerShell (Admin)".
- List all installed WSL distros. Type
wsl --list --verboseorwsl -l -vand press Enter. Note the exact name of the Kali distribution (usually "kali-linux"). - Terminate any running WSL instances. Run
wsl --shutdownto stop all WSL processes. - Unregister the Kali distro. Run
wsl --unregister kali-linux(replacekali-linuxwith the exact name from step 3). This deletes the virtual hard disk and all files inside it. - Confirm removal. Run
wsl --list --verboseagain — Kali should no longer appear. - Optional: clean up Start menu shortcuts. If a Kali shortcut remains, right-click it and choose "Unpin from Start" or delete it from the Start menu folder.
Common Mistakes
- Running the wrong command: Using
wsl --uninstallinstead ofwsl --unregister. The former is not a valid WSL command; the latter is what actually removes the distro. - Not shutting down WSL first: If a distro is running, unregistering may fail or leave a stale process. Always run
wsl --shutdownfirst. - Typing the wrong distro name: If you have multiple distros, you might accidentally unregister the wrong one. Double-check the exact name from the list.
- Forgetting to back up: Unregistering deletes all files in that distro permanently. There's no recycle bin.
Tips
- Back up important files: Copy anything you need from Kali (e.g., in
/home) to Windows before unregistering. You can usecporscpfrom inside Kali, or simply copy via the \wsl$ path in File Explorer. - Check disk space after removal: The virtual hard disk file (ext4.vhdx) is deleted automatically, but you can verify with
wsl --list --verboseand by checking your C: drive free space. - If you plan to reinstall later: Use
wsl --install -d kali-linuxto get a fresh copy. - Remove leftover WSL feature (optional): If you want to remove WSL entirely, go to "Windows Features" and uncheck "Windows Subsystem for Linux" (plus the Virtual Machine Platform if you used it). But that's beyond this guide.
Troubleshooting
- "The specified distribution is not installed" error: This means the name you typed doesn't match. Run
wsl --list --verboseto see the exact name. It might be "kali-linux" or something else like "Kali" — use what's shown. - "Access is denied" or "Permission denied": Make sure you're running PowerShell or Command Prompt as Administrator. Right-click and select "Run as administrator".
- Unregister command hangs: Close all WSL windows and try
wsl --shutdownagain. If it still hangs, restart Windows and retry. - Kali still appears in the Start menu: The shortcut is just a link; it's safe to delete manually. Right-click and choose "Unpin from Start" or browse to
%AppData%\Microsoft\Windows\Start Menu\Programsand delete the shortcut. - Disk space not freed: Sometimes the .vhdx file is not immediately removed due to a delay. Wait a few minutes, or run
Optimize-VHDif you're using Hyper-V (advanced). Usually a restart clears it.
Frequently Asked Questions
- Does unregistering Kali delete all my files inside it? Yes. The entire virtual disk is removed, including all files, settings, and installed packages. Back up anything you need first.
- Will this remove WSL itself? No. It only removes the Kali distribution. WSL remains installed and functional for other distros.
- Can I undo the uninstall? No, it's permanent. You can reinstall Kali from the Microsoft Store or via
wsl --install -d kali-linux, but you'll get a fresh system. - How do I know if I have multiple distros? Run
wsl --list --verbose. It shows all installed distros and their state. - What if I only want to reset Kali without removing it? You can use
wsl --unregister kali-linuxand then reinstall it — that's a clean reset. Alternatively, usewsl --terminate kali-linuxto stop it, but that doesn't delete files. - Is there a way to uninstall Kali from the Microsoft Store? Yes, you can also go to Settings > Apps > Installed apps, find "Kali Linux", and click Uninstall. That does the same as unregistering.