Skip to content

Instantly share code, notes, and snippets.

@epassaro
Created October 17, 2020 20:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save epassaro/3d692bee1c50c27efac842ac213dadc2 to your computer and use it in GitHub Desktop.
Save epassaro/3d692bee1c50c27efac842ac213dadc2 to your computer and use it in GitHub Desktop.
Clean WINE local files
#! /bin/bash
echo; echo -n "Remove WINE and its configuration? [Y/n]: "
read -n 1 reply
if [ "$reply" != "y" ] && [ "$reply" != "Y" ]; then
echo; echo
echo "Exiting."; echo
exit 0
fi
echo; echo
# Folders
rm -rf ~/.wine
rm -rf ~/.cache/wine
rm -rf ~/.cache/winetricks
rm -rf ~/.local/share/applications/wine
rm -rf ~/.local/share/mime
# Files
rm -f ~/.local/share/applications/wine*
rm -f ~/.local/share/desktop-directories/wine*
rm -f ~/.config/menus/applications-merged/wine*
# Icons
rm -f ~/.local/share/icons/hicolor/*/*/????_*.{xpm,png}
rm -f ~/.local/share/icons/hicolor/*/*/*-x-*.{xpm,png}
# rm -f ~/.local/share/icons/hicolor/*/*/image-bmp.png
# Update MIME database
mkdir -p ~/.local/share/mime/packages
update-mime-database ~/.local/share/mime
update-desktop-database ~/.local/share/applications
echo "Finished."; echo
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment