How do I remove all programs connected to Wine and Wine with one command?

I want to remove all programs associated to Wine and Wine itself in one command, can it be done? The whole point of this question is that I don't want to find any files connected to wine.


Solution 1:

sudo apt-get remove wine
rm -rf $HOME/.wine
rm -f $HOME/.config/menus/applications-merged/wine*
rm -rf $HOME/.local/share/applications/wine
rm -f $HOME/.local/share/desktop-directories/wine*
rm -f $HOME/.local/share/icons/????_*.xpm

This would uninstall wine and remove all menus and icons.

Solution 2:

WARNING! DOING THIS WILL DESTROY DATA

sudo apt-get remove wine
rm -rf ~/.wine

If you really want it to be one command, replace the newline between the two lines with &&

That will remove Wine (if you installed it from the repo) and it'll destroy the default installation area for applications.

Things it won't do:

  • It won't remove Wine if you installed it without a package.
  • It won't delete things that have been installed to non-standard places.
  • It won't delete files that Wine applications have created outside of ~/.wine
  • It won't clean up your menu.
  • It won't clean up any file associations you've pointed at Wine apps.
  • It won't call you tomorrow morning.

Clean up your Menus with Alacarte

Because the above won't remove old program links in your menus, you need to manually remove the Wine applications. Thankfully in recent versions of Wine, all programs are automatically clustered under a "Wine" submenu. We just need to hide or remove this:

  1. Right click the Menu button and click Edit Menus
  2. Find the Wine portion and either delete it or uncheck it.