How to Purge Wine from Linux Completely

If you want to purge Wine from Linux, you need to remove two different things: the system package installed by your distribution and the Wine prefix that stores Windows applications, registry data, and per-user settings. Removing the package alone does not erase files in your home directory. Debian's APT documentation explicitly notes that package purging does not remove user data stored there.

The commands below cover Ubuntu, Debian, Arch Linux, Fedora, and openSUSE. Before deleting anything, close your Windows applications and back up any files you want to keep from your Wine prefixes.

1. Check how Wine is installed

Open a terminal and confirm that the system Wine command exists:

command -v wine
wine --version

If the first command returns a path such as /usr/bin/wine, you have a Wine executable available through your shell. The Wine manual page also documents WINEPREFIX: when it is not set, Wine stores its default prefix in $HOME/.wine.

Linux terminal checking the Wine command path and Wine version
Check the Wine command before removing packages so you know which installation your shell is using.

2. Stop Wine and identify prefixes you want to remove

Close all Windows programs first. While Wine is still installed, you can stop its per-user server with:

wineserver -k

The default prefix is ~/.wine — note the lowercase w. The old instructions that use ~/.Wine are incorrect on a case-sensitive Linux filesystem. If you created additional prefixes with WINEPREFIX, those are separate directories and must be handled individually.

Linux file manager with the hidden .wine folder selected in the home directory
The default Wine prefix is the hidden .wine directory in your home folder.

Do not delete a prefix until you are sure it contains nothing you need. Removing it permanently deletes the Windows programs and Wine-side data stored inside it.

3. Remove the Wine package for your distribution

Ubuntu and Debian

First list installed packages whose names begin with Wine:

dpkg-query -W -f='${binary:Package}\n' 'wine*' 2>/dev/null

If you installed WineHQ Stable, purge its metapackage and then remove dependencies that are no longer required:

sudo apt purge winehq-stable
sudo apt autoremove --purge

For WineHQ Development or Staging, substitute winehq-devel or winehq-staging. If you installed your distribution's wine package instead, use sudo apt purge wine. Review APT's proposed removals before confirming. The APT manual explains the difference between remove, purge, and autoremove.

Linux terminal running apt purge winehq-stable followed by apt autoremove --purge
On Debian-based systems, purge the Wine package you installed and then clean unused dependencies.

Arch Linux

Check which Wine branch is installed, then remove that package:

pacman -Q | grep -E '^wine($|-)'
sudo pacman -Rns wine

If you use wine-staging or another Wine package, replace wine with its actual package name. In pacman, -s removes dependencies that are no longer required and were not explicitly installed, while -n prevents package backup files from being saved. See the official pacman manual before confirming a large removal transaction.

Arch Linux terminal running sudo pacman -Rns wine
Arch users can remove the installed Wine branch with pacman and clean unneeded dependencies in the same transaction.

Fedora

Fedora provides Wine as a metapackage with Wine subpackages. Check what is installed, then remove the metapackage:

dnf list --installed 'wine*'
sudo dnf remove wine

Current DNF5 behavior removes dependencies that are no longer needed unless autoremove is disabled. If the first command shows Wine subpackages that you explicitly installed and still remain afterward, remove only the ones you no longer want. See Fedora's Wine package page and the DNF5 remove documentation.

Fedora terminal running sudo dnf remove wine
Fedora's Wine metapackage can be removed with DNF, which also cleans dependencies that are no longer needed by default.

openSUSE

On openSUSE, inspect the installed Wine packages and remove Wine with dependency cleanup enabled:

zypper se -i wine
sudo zypper rm -u wine

The -u option is the short form of --clean-deps, which removes dependencies that become unnecessary. This behavior is documented in the openSUSE Zypper guide.

openSUSE terminal running sudo zypper rm -u wine
Use Zypper's dependency-cleanup option when removing Wine on openSUSE.

4. Delete Wine prefixes and remaining user data

After the package is gone, delete the default prefix only if you no longer need its Windows applications or files:

rm -rf -- "$HOME/.wine"

Custom prefixes are not automatically removed. Verify each path before deleting it; never run rm -rf against an unverified variable or a directory you have not backed up.

Linux home folder showing .wine and .wine-prefixes directories ready for review
Review the default and custom Wine prefix folders separately before deleting them.

Wine managers such as Bottles, Lutris, and Steam/Proton can keep their own runners or compatibility prefixes. Removing the system Wine package does not necessarily remove those environments, so manage them from the application that created them unless you intentionally want to delete their data too.

5. Verify Wine is gone

Start a new terminal and run:

command -v wine
wine --version

If Wine has been fully removed from your shell path, command -v wine should print nothing and the second command should report that wine is not found. If a Wine executable still appears, it may come from another package, a manually installed build, or a custom directory in your PATH.

Ubuntu terminal showing no Wine command path and a wine command not found message
A final command check confirms whether another Wine executable is still available in your shell path.

Leave a Comment

How to Record Speaker Output on Linux with Audacity

How to Record Speaker Output on Linux with Audacity

Capture Linux desktop audio in Audacity by routing its recording stream to your output device’s monitor source. Follow PulseAudio and PipeWire steps, export tips, and fixes for silent tracks.

How to Use Dropbox on Linux: Install and Sync Your Files

How to Use Dropbox on Linux: Install and Sync Your Files

Install Dropbox on Linux from the official package, sign in, sync a local folder, manage selective sync, and check status from the command line.

How to Install Inkscape on Linux: Ubuntu, Fedora, Arch, and More

How to Install Inkscape on Linux: Ubuntu, Fedora, Arch, and More

Install Inkscape from your Linux distribution’s repositories, the Ubuntu stable PPA, Snap, or Flathub, with current commands and notes for choosing a package source.

How to Find and Remove Duplicate Files on Linux With FSlint

How to Find and Remove Duplicate Files on Linux With FSlint

Use FSlint to scan selected Linux folders, review duplicate groups, and safely delete redundant files or learn when hard-link merging is appropriate.

How to Install SABnzbd on Linux and Configure It

How to Install SABnzbd on Linux and Configure It

Install SABnzbd on Ubuntu or Debian, or run it in Docker on another Linux host. Then open the web interface and configure your provider and download folders.

How to Install the Paper GTK Theme on Linux

How to Install the Paper GTK Theme on Linux

Install the Paper GTK theme from supported Linux repositories, enable it for GTK apps in GNOME Tweaks, and see what the legacy theme can and cannot change.

How to Install and Set Up Plex on OpenMediaVault with Compose

How to Install and Set Up Plex on OpenMediaVault with Compose

The old OpenMediaVault Plex plugin is archived. Set up Plex on OMV 8 with OMV-Extras, the Compose plugin, persistent storage, and Plex’s official container.

How to Clean and Speed Up Ubuntu Safely

How to Clean and Speed Up Ubuntu Safely

Clean and speed up Ubuntu with safe APT cleanup, storage checks, and startup controls that help free space and troubleshoot a sluggish desktop.

How to Install the Hiri Email Client on Linux

How to Install the Hiri Email Client on Linux

Install Hiri on Linux with its Snap package or official tarball, add a desktop launcher, and check supported accounts plus a warning about Hiri’s old Snap release.

How to Get System Specifications for a Linux PC

How to Get System Specifications for a Linux PC

Use Fastfetch and built-in Linux commands to check your distro, kernel, CPU, memory, graphics, storage, and connected devices, then save a clear report.