Skip to content

Instantly share code, notes, and snippets.

@chenlilyd
Created June 8, 2024 03:37
Show Gist options
  • Save chenlilyd/cc661c04f17557c5415e92b98077bbb8 to your computer and use it in GitHub Desktop.
Save chenlilyd/cc661c04f17557c5415e92b98077bbb8 to your computer and use it in GitHub Desktop.
clean wine leftover

If you don't have Wine installed but you still see "Wine Internet Explorer" as an option in the "Open With" menu, it might be because of leftover desktop entries or MIME associations. Here's how you can clean it up:

  1. Remove Wine Desktop Entries: Desktop entries for Wine applications are usually stored in ~/.local/share/applications. You can remove these manually:

    rm ~/.local/share/applications/wine-*
  2. Update MIME Database: After removing the desktop entries, update the MIME database to refresh the "Open With" menu:

    update-desktop-database ~/.local/share/applications
  3. Remove Wine Mime Types: If there are any MIME type associations related to Wine, you might want to clean those up as well. Check for and remove Wine-related MIME types:

    grep -rl 'wine' ~/.local/share/mime/ | xargs rm
  4. Edit the Default Application Associations: Edit the ~/.config/mimeapps.list file to remove any references to Wine. This file manages the default applications for MIME types.

    Open the file in your preferred text editor:

    nano ~/.config/mimeapps.list

    Look for any entries related to Wine and remove them. For example:

    [Default Applications]
    text/html=wine-internet-explorer.desktop

    Remove or replace the wine-internet-explorer.desktop entries with your preferred application.

  5. Refresh the Desktop Environment: Restart your desktop environment or log out and log back in to ensure the changes take effect.

By following these steps, you should be able to remove the "Wine Internet Explorer" option from the "Open With" menu and clean up any leftover configurations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment