Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Completely uninstall VMWare on macOS
#!/usr/bin/env bash
# Usage: bash uninstall_vmware.bash
remove() {
entry="$1"
echo -ne "Removing $entry ["
sudo rm -rf "$entry"
if [[ ! -e "$entry" ]]; then
echo -ne "OK"
else
echo -ne "FAILED"
fi
echo -ne "]"
}
remove "/Applications/VMware Fusion.app"
remove "/Library/Application Support/VMware"
remove "/Library/Application Support/VMware Fusion"
remove "/Library/Preferences/VMware Fusion"
remove "/private/var/root/Library/Logs/VMware"
remove "/private/var/db/vmware"
remove "/Library/Logs/VMware/"
remove "/Library/Logs/VMware Fusion Services.log"
remove "/Library/Logs/DiagnosticReports/vmware*"
remove "/private/var/run/vmware"
remove "/private/var/run/VMware Fusion Services.lock"
remove "/private/var/run/VMware Fusion Services.sock"
remove "/private/var/root/Library/Preferences/VMware Fusion"
remove "/var/db/BootCaches/*/app.com.vmware.fusion.playlist"
remove "$HOME/Library/Application Support/VMware Fusion"
remove "$HOME/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.vmware.fusion.sfl"
remove "$HOME/Library/Caches/com.vmware.fusion"
remove "$HOME/Library/Preferences/VMware Fusion"
remove "$HOME/Library/Logs/VMware"
remove "$HOME/Library/Logs/VMware Fusion"
remove "$HOME/Library/Preferences/VMware Fusion"
remove "$HOME/Library/Preferences/com.vmware.fusion.LSSharedFileList.plist"
remove "$HOME/Library/Preferences/com.vmware.fusion.plist"
remove "$HOME/Library/Preferences/com.vmware.fusionStartMenu.plist"
remove "$HOME/Library/Preferences/com.vmware.fusion.LSSharedFileList.plist"
remove "$HOME/Library/Preferences/com.vmware.fusion.LSSharedFileList.plist.lockfile"
remove "$HOME/Library/Preferences/com.vmware.fusion.plist"
remove "$HOME/Library/Preferences/com.vmware.fusion.plist.lockfile"
remove "$HOME/Library/Preferences/com.vmware.fusionDaemon.plist"
remove "$HOME/Library/Preferences/com.vmware.fusionDaemon.plist.lockfile"
remove "$HOME/Library/Preferences/com.vmware.fusionStartMenu.plist"
remove "$HOME/Library/Preferences/com.vmware.fusionStartMenu.plist.lockfile"
@stephane

This comment has been minimized.

Copy link

commented Jul 30, 2018

/etc/paths.d/com.vmware.fusion.public is missing

@rehanhwr

This comment has been minimized.

Copy link

commented Oct 21, 2018

thanks

@iamsmurph

This comment has been minimized.

Copy link

commented Nov 5, 2018

Thank you, this is very helpful

@hfossli

This comment has been minimized.

Copy link

commented Dec 20, 2018

echo -ne "]" should be echo -e "]"

@mrturkmen06

This comment has been minimized.

Copy link

commented Dec 27, 2018

These commands might require if virtual server is installed on VmWare.

remove ~/Virtual\ Machines
remove ~/Virtual\ Machines.localized/

@franton

This comment has been minimized.

Copy link

commented Sep 2, 2019

Nice bit of code. However it may leave lsregister in an uncertain state. VMware themselves recommend running:

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user

which forces lsregister to rescan all the app bundles in the macOS filesystem. A reboot is normally handy too. Just means you don't have spurious apps in the right click contextual menus and so forth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.