Getting rid of Wine

IbChristian

Member
Joined
Feb 26, 2026
Messages
84
Reaction score
21
Credits
760
I'm trying to purge Wine. it doesn't work for the Windows program I want to run. However I cannot seem to get rid of it. There is no uninstall option, and I have tried the methods listed here:
There are 4 major steps.
1. Create a backup of the OS and your HOME. That would typically be timeshift and back-in-time on Mint. Better to have them and not need them, right?
2. sudo apt remove winehq-stable # remove the wine package
3. rm -rf ~/.wine # this will clean up your PERSONAL WINE stuff and installed programs, data, users and base Windows stuff if you used any winetricks to get programs working.
4. Remove the PPA for WineHQ from your APT setup. sudo rm https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources This isn't really required. It is just a few lines in 1-2 files under /etc/apt/sources.list.d/ # you can see the filename in your post above. I wouldn't bother with the keyrings, but you can if you like.
5. sudo apt update and sudo apt upgrade just to get updated and upgraded after removing a PPA. Shouldn't really do anything.
6. sudo apt autoremove # this will remove any other packages that the WINE package caused to be installed. It is optional, but a good idea to run every few weeks or at least once a month to prevent too much cruft.
The first four above are important. The last 2 are optional.

I even tried using TimeShift, but it's still there. Short of completely reinstalling Mint, is there another way to get rid of Wine?
 


@IbChristian :-

Mm. I don't know much about removing stuff the "official" way, 'cos I haven't run a 'mainstream' distro for ages.

This IS, y'see, why @wendy-lebaron & myself both recommended using the WINE AppImages, since once you delete it, it's GONE. However:-

From what I remember of using the 'full' WINE builds, the few binaries, collection of scripts & various sym-links that actually make WINE 'tick' - which live in /usr/bin, OR maybe /usr/local/bin - don't take up very much space, and by themselves don't do a damn thing.

The important steps in that list you posted would be 3) and, to a lesser extent, 4). The hidden WINE 'prefix' in your $HOME directory:-

Code:
/home/your_user-name/.wine

...is the actual open-source Windows 'install', along with whatever programs/apps you've added. This comprises a big chunk of space, and is the bit that could possibly pose malware threats, etc.

This definitely DOES need removing.

Once that's gone, the remaining cruft cannot do anything by itself, and honestly can't hurt to leave it there. This IS the one downside to the standard WINE install; it's a piece of cake to add to your system, but an absolute bugger to remove by normal means.....because it doesn't HAVE an 'installer/uninstaller' mechanism in the way you're used to in Windows.

~~~~~~~~~~~~~~~~~~~~​

The traditional way we install it under Puppy is by means of an SFS package - Squash File System - which works because Puppy uses a 'layering' type of file-system that simply 'loads', or 'layers' the install in place when you want it.....then 'unloads', or deletes the 'layer' when you don't. And all this can be done 'on-the fly', as & when needed.

The AppImages are just as effective. They only 'link' into the system via a simple script when needed; when the user is finished, another script will 'unlink' them.....and there's no trace the thing was ever there.

~~~~~~~~~~~~~~~~~~~~~~​

As part of the Puppy-portable ecosystem we've developed, I've built the WINE AppImages into totally self-contained directories that will literally run from anywhere; either from inside the OS, or externally from outside it. Even the 'prefix' lives here.....only temporarily 'linking' into the system as & when required.

I LIKE our way of doing things. I never did like the way that mainstream distros handle WINE, due to their 'full install' nature...

Sorry I can't be of any more help. Others may be able to advise better than I can.


Mike. ;)
 
Last edited:

f33dm3bits:​

OK, that got rid of the menu entries, all that's left are a bunch of packages that menu search found. Do I need to get rid of them as well, just in case some future install requires deletion of wine?
 
Without knowing exactly what is in "a bunch of packages", it's hard to say what else might need removing. But no packages require deleting wine.
 

f33dm3bits:​

OK, that got rid of the menu entries, all that's left are a bunch of packages that menu search found. Do I need to get rid of them as well, just in case some future install requires deletion of wine?
After a purge command, as shown in post #3 by @f33dm3bits, there shouldn't be any wine packages such as wine, or wine32, left on the system. That means all the system files, including the system configuration files installed by the wine packages should have been removed.

If however, there are directories or files left with the name "wine" in them on the system, that is not unusual, because such directories and files are usually not installed from a wine package installation. For example, running the command: locate wine, after the wine packages have been removed and purged, may still locate directories or files with the wine name, but these directories and files will belong to other packages. For example, the gnome-wine-icon-theme package installs icons used by the wine package, and places them in a directory called: gnome-wine, but these files with the wine name are from a separate package to wine and don't need to be removed. (In fact another package may depend on them). The files with the icons are used when wine is installed. If wine is reinstalled, the gnome icons are already there for wine's use. In the following example, the command shows which package the gnome-wine directory is part of:
Code:
[~]$ dpkg -S /usr/share/icons/gnome-wine
gnome-wine-icon-theme: /usr/share/icons/gnome-wine
The output shows that the gnome-wine directory is part of the gnome-wine-icon-theme package. There will be other files and directories that the locate wine command will show up, none of which are part of the wine packages, but are installed for convenience.

The user may still be left with wine files in the user's home directory which could be in any directory such as:
~/.wine
~/.config/wine
~/.local/share/wine
~/.local/share/applications/wine
I don't have wine installed, but the above are the directories that are the usual suspects which could potentially be used. With the removal of wine, all of the those files and directories associated with wine can be removed with the rm and rmdir commands with ordinary user privileges. If the user wishes to retain the configuration in those files, one can leave them in place in which case they will likely be applied the next time wine is installed. A new wine package may however, alter them at its discretion.
 
Last edited:
Probably something like this.
Code:
sudo apt purge wine*

That will do it...once uninstalled run this command...
Code:
wine --version
you won't get a result.
1776292753075.gif
 


Follow Linux.org

Members online


Top