How to uninstall WINE applications

Updated: April 29, 2019

Sounds like a noob question, does it not? Well, turns out, some things aren't trivial. In fact, the whole WINE framework isn't trivial. There are many ways you can go about trying to install and configure Windows software on Linux machines. You have 32-bit and 64-bit WINE, there's UI (but it's weird) and command line, you can also use winetricks, and then some.

Most if not all of the guides related to WINE out there showcase testing and installing software - but not how to remove said software. Well, in this short little tutorial, I'd like to explain how you do exactly that. And because things aren't simple, we will do this in several different ways. After me.

WINE uninstaller

On the command line, just type this: wine uninstaller. This will launch an Add/Remove applet similar to what you get in Windows, which will list your installed WINE programs. The name and the invocation are definitely not intuitive. Henceforth, the actions are simple.

WINE Uninstaller

Wait! There's WINE 64-bit too!

Indeed. You may not see all your software listed. You might need to run: wine64 uninstaller. There.

64-bit uninstaller

Manual deletion

It is possible you (still) don't see your software listed for some odd reason. That can happen. To that end, you can also always manually delete software - just go into the hidden directory ~/.wine, and navigate to your virtual C: drive (~/.wine/drive_c). From that point, it's just a regular Windows tree, and you can delete folders, including the contents of Program Files. Of course, this isn't the ideal way, because you will still have orphaned menu entries and shortcuts.

What you can do in that case is delete entries from user.reg and system.reg files. We talked about these files when we tweaked Notepad++, so you should be familiar with their existence and purpose. These files act as sort of registry database for your installed WINE software. If you remove data from these files, you effectively unregister applications. Search for the relevant entries (grep) in these two files and delete what you no longer need. This can be a tedious process, but it will allow you to clean up your WINE setup without deleting everything. For instance:

grep -i irfan ./user.reg

grep -i irfan ./system.reg
[Software\\IrfanView\\shell\\open\\command] 1539246046
@="\"C:\\Program Files\\IrfanView\\i_view64.exe\""
[Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\IrfanView64] 1539246046
"DisplayIcon"="C:\\Program Files\\IrfanView\\i_view64.exe,0"
"DisplayName"="IrfanView 4.51 (64-bit)"
"InstallLocation"="C:\\Program Files\\IrfanView\\"
"Publisher"="Irfan Skiljan"
"UninstallString"="\"C:\\Program Files\\IrfanView\\iv_uninstall.exe\""

Delete everything

If you're still not happy, or you want to complete remove WINE, just delete the entire .wine folder in your home directory. This means you will need to rerun all your configurations if you decide to reinstall WINE one day. Be extra careful running this command so you do not delete your data. If you're not sure, first change into this folder and then delete contents inside it.

rm -rf ~/.wine


Another mildly obscure tutorial comes to an end. But I'd like to believe it's been useful, because most of WINE stuff isn't trivial. You do need a fair degree of lateral thinking to understand all the bits and pieces, the hybrid model that's not quite Linux and not quite Windows.

One of the more difficult tasks is software removal. Most people are okay with wine "program", to get their applications installed (provided this works, as it's by no means guaranteed), but the removal isn't a straightforward anti-symmetry of this command. If you're familiar with Linux, you'd expect something along the lines of dnf install, dnf remove. Well, hopefully, we've cleared the confusion. Lastly, since we're talking about WINE products, so to speak, proverbially, all that is left to say is prost, salute, and of course ...