如果您不再在 Mac 上使用VirtualBox ,(Mac)您(VirtualBox)可能希望卸载它以减少混乱并释放磁盘空间。或者,您可能希望将其删除作为例行故障排除的一部分。
然而,Oracle 的开源虚拟化程序将支持文件存储在多个位置,因此标准的 Mac 应用程序卸载(standard Mac app uninstallation)会导致留下许多文件。

相反,使用以下技术在MacBook 、(MacBook) Mac mini(Mac mini)或 iMac
上完全卸载VirtualBox 。
注意:以下方法不会删除您的虚拟机磁盘映像。删除它们的唯一方法是从您的Mac(Mac)中手动删除相关文件夹(更多内容见下文)。
如何使用VirtualBox 卸载工具(VirtualBox Uninstall Tool)在Mac上卸载(Mac)VirtualBox
从Mac卸载(Mac)VirtualBox的最快、最安全、最方便的方法是使用VirtualBox 卸载工具,它与适用于 macOS 的(VirtualBox Uninstall Tool)VirtualBox安装程序包
捆绑在一起。
它是一个命令行实用程序,可以删除Mac上所有与(Mac)VirtualBox相关的文件,例如缓存数据、驱动程序和 kexts(内核扩展)。
- 如果VirtualBox打开,请退出;按住 Control 单击或右键单击Dock上的(Dock)Oracle VM VirtualBox Manager图标,然后选择退出(Quit)。如果您在退出程序时遇到问题,Option+Control-click该图标并选择Force-Quit。

- 从VirtualBox.org 的下载页面(VirtualBox.org’s Downloads page)获取适用于 macOS的最新版本的VirtualBox安装程序。如果您使用的是应用程序的Apple Silicon版本,请务必下载匹配的平台包。

- 访问浏览器的下载(Downloads)管理器并选择VirtualBox DMG文件。

- 双击显示的(Double-click)VirtualBox弹出窗口中的VirtualBox_Uninstall.tool图标。终端(Terminal)窗口应打开并加载命令行工具的内容。

注意:如果您看到“无法打开VirtualBox_Uninstall.tool ,因为它来自身份不明的开发人员”错误,(VirtualBox_Uninstall.tool)请按住 Control 键并单击(Control-click)VirtualBox_Uninstall.tool 图标(VirtualBox_Uninstall.tool),然后选择“打开(Open)方式” > Terminal > Allow” 。
- 键入 Yes(Type Yes)并按Return以确认您要卸载VirtualBox。

- 等到(Wait)VirtualBox_Uninstall.tool从您的(VirtualBox_Uninstall.tool)Mac中删除VirtualBox和相关文件和文件夹。完成后您会看到“Process Completed”终端输出。
如何使用专用的应用程序删除实用程序(Dedicated App Removal Utility)在Mac上卸载(Mac)VirtualBox
如果您在使用VirtualBox 卸载工具(VirtualBox Uninstall Tool)时遇到问题,完全删除VirtualBox的另一种方法是使用专用于 Mac 的应用程序删除实用程序(dedicated app removal utility for the Mac)。例如,以下是如何使用AppCleaner在 macOS 上卸载 VirtualBox。
- 下载并打开AppCleaner。可从FreeMacSoft.net(FreeMacSoft.net)免费下载。

- AppCleaner是一个ZIP文件,您的Mac下载后会自动解压缩;访问您计算机的下载(Downloads)文件夹并双击程序图标将其打开;你不必安装它。

注意:如果您的Mac阻止您打开AppCleaner,请打开系统设置(System Settings)应用程序,选择隐私(Privacy)和安全(Security),然后选择仍然打开(Open Anyway)以绕过安全限制。
- 选择AppCleaner窗口
右上角的应用程序列表图标。(Applications List)

- 向下滚动(Scroll)列表,选择VirtualBox,然后等待AppCleaner生成与该程序相关的文件列表。

- 选择删除(Choose Remove)以删除所有VirtualBox安装文件。

或者,将VirtualBox(VirtualBox)应用程序从Mac上的(Mac)应用程序(Applications)文件夹拖放到AppCleaner窗口中,然后选择删除(Remove)。
VirtualBox卸载过程结束后,您可以选择保留或删除Mac中的(Mac)AppCleaner。如果您选择后者,只需将程序从Downloads(Downloads)文件夹拖放到Trash即可。
如何使用 Finder(Mac Using Finder)在Mac上手动卸载(Manually Uninstall)VirtualBox 应用程序(VirtualBox Application)
如果您更喜欢手动删除VirtualBox的方法,您可以将该程序移至废纸篓(Trash),然后通过Finder手动删除剩余的项目。
即使您使用上述方法,您也应该检查以下位置是否有VirtualBox残留物。
注意:为防止意外删除对 macOS 至关重要的文件,请考虑在开始之前
创建时间机器备份。(creating a Time Machine backup)
- 打开Finder,选择边栏上的应用程序,然后将VirtualBox移到 Mac 的垃圾桶(Trash)中。

- 输入您的Mac用户帐户密码并选择确定。

- 按住 Control 键并单击(Control-click)Dock上的Finder图标,然后选择前往文件夹(Folder)。

- 粘贴以下路径并按回车键:
~/图书馆/首选项

- 将(Drag)以下文件拖入废纸篓(Trash)。
- org.virtualbox.app.VirtualBox.plist
- org.virtualbox.app.VirtualBoxVM.plist

- 重复使用 Go to Folder框从以下目录
中删除VirtualBox剩余物:(VirtualBox)
- ~/Library/Saved Application State — org.virtualbox.app.VirtualBox.savedState
- ~/图书馆——VirtualBox
- /Library/Logs/DiagnosticReport — VirtualBoxVM_ (Date-Mac-Name).wakeups_resource.diag
- /usr/local/bin——VirtualBox
- /usr/local/bin — VirtualBoxVM
- /usr/local/bin — VBoxManage
- /usr/local/bin — VBoxVRDP
- /usr/local/bin — VBoxHeadless
- /usr/local/bin — VBoxBugReport
- /usr/local/bin — VBoxBalloonCtrl
- /usr/local/bin — VBoxAutostart
- /usr/local/bin — VBoxAudioTest
- /usr/local/bin — vbox-img
- /usr/local/bin — vboximg 安装
- /Library/LaunchAgents — org.virtualbox.vboxwebsrv.plist
- /Library/LaunchDaemons — org.virtualbox.startup.plist
- /图书馆/应用支持——VirtualBox(Support — VirtualBox)
- 重新启动您的Mac。如果一切正常,您可以选择清空垃圾箱(empty the Trash)。
可选:如何删除VirtualBox VM 文件夹(VirtualBox VMs Folder)
如果要在卸载VirtualBox后从(VirtualBox)Mac释放额外的存储空间,则必须删除VirtualBox VMs目录的内容。它包含您的OS X、Windows和Linux操作系统磁盘映像。
该文件夹位于您的Mac用户帐户的根目录中。要访问它,请在转到文件夹(Folder)框中键入以下内容,然后按回车键:

每个虚拟机都驻留在该目录的一个子文件夹中。丢弃(Trash)不需要的任何 VM。
警告:如果您打算稍后重新安装VirtualBox,请考虑保留图像或将它们移动到外部存储设备。如果删除虚拟机(VMs),您将永久丢失其中的所有数据。
VirtualBox在(VirtualBox Fully)Mac上完全卸载
使用VirtualBox 卸载工具是在(VirtualBox Uninstall Tool)Mac上彻底卸载VirtualBox的最佳方法。如果失败,请使用(Use)应用程序删除实用程序,或者自己动手并手动删除应用程序及其所有残留物。另外,不要忘记单独处理您的虚拟机磁盘映像。
How to Completely Uninstall VirtualBox on Your Mac
If you don’t uѕe VirtualBox on your Mac anymore, you’rе probably looking to uninstall it to reduce clutter and free up disk ѕpace. Or, you might bе looking to removе it as part of routine troubleshooting.
However, Oracle’s open-source virtualization program stores support files in multiple locations, so a standard Mac app uninstallation results in many files left behind.

Instead, use the techniques below to completely uninstall VirtualBox on a MacBook, Mac mini, or iMac.
Note: The following methods won’t remove your virtual machine disk images. The only way to delete those is to manually delete the relevant folders from your Mac (more on that further below).
How to Uninstall VirtualBox on Mac Using the VirtualBox Uninstall Tool
The quickest, safest, and most convenient way to uninstall VirtualBox from your Mac is to use the VirtualBox Uninstall Tool that comes bundled with the VirtualBox installer package for macOS.
It’s a command-line utility that deletes all VirtualBox related-files on your Mac, such as cached data, drivers, and kexts (kernel extensions).
- Exit VirtualBox if it’s open; Control-click or right-click the Oracle VM VirtualBox Manager icon on the Dock and select Quit. If you have trouble quitting the program, Option+Control-click the icon and select Force-Quit.

- Get the latest version of the VirtualBox installer for macOS from VirtualBox.org’s Downloads page. If you’re using the Apple Silicon version of the application, make sure to download the matching platform package.

- Visit your browser’s Downloads manager and select the VirtualBox DMG file.

- Double-click the VirtualBox_Uninstall.tool icon on the VirtualBox pop-up that shows up. A Terminal window should open and load the contents of the command-line tool.

Note: If you see a “VirtualBox_Uninstall.tool cannot be opened because it is from an unidentified developer” error, Control-click the VirtualBox_Uninstall.tool icon and select Open With > Terminal > Allow.
- Type Yes and press Return to confirm you want to uninstall VirtualBox.

- Wait until the VirtualBox_Uninstall.tool removes VirtualBox and associated files and folders from your Mac. You’ll see the “Process Completed” Terminal output upon completion.
How to Uninstall VirtualBox on Mac Using a Dedicated App Removal Utility
If you have trouble using the VirtualBox Uninstall Tool, an alternative way to fully delete VirtualBox is to use a dedicated app removal utility for the Mac. As an example, here’s how to use AppCleaner to uninstall VirtualBox on macOS.
- Download and open AppCleaner. It’s available as a free download at FreeMacSoft.net.

- AppCleaner comes as a ZIP file that your Mac automatically unzips after it downloads; visit your computer’s Downloads folder and double-click the program icon to open it; you don’t have to install it.

Note: If your Mac blocks you from opening AppCleaner, open the System Settings app, choose Privacy & Security, and select Open Anyway to bypass the security restriction.
- Select the Applications List icon on the top-right of the AppCleaner window.

- Scroll down the list, select VirtualBox, and wait until AppCleaner produces a list of files related to the program.

- Choose Remove to delete all VirtualBox installation files.

Alternatively, drag and drop the VirtualBox app from the Applications folder on your Mac into the AppCleaner window and choose Remove.
After the VirtualBox uninstall process, you can choose to keep or delete AppCleaner from your Mac. If you opt for the latter, just drag and drop the program from the Downloads folder to the Trash.
How to Manually Uninstall the VirtualBox Application on Mac Using Finder
If you prefer a hands-on approach to removing VirtualBox, you can move the program to the Trash and follow by deleting leftover items manually via Finder.
Even if you use the methods above, you should check the following locations for VirtualBox leftovers.
Note: To protect against accidentally deleting files critical to macOS, consider creating a Time Machine backup before you begin.
- Open Finder, select Applications on the sidebar, and move VirtualBox into your Mac’s Trash.

- Enter your Mac user account password and select OK.

- Control-click the Finder icon on the Dock and select Go to Folder.

- Paste the following path and press Return:
~/Library/Preferences

- Drag the following files into the Trash.
- org.virtualbox.app.VirtualBox.plist
- org.virtualbox.app.VirtualBoxVM.plist

- Use the Go to Folder box repeatedly to remove VirtualBox leftovers from the following directories:
- ~/Library/Saved Application State — org.virtualbox.app.VirtualBox.savedState
- ~/Library — VirtualBox
- /Library/Logs/DiagnosticReport — VirtualBoxVM_(Date-Mac-Name].wakeups_resource.diag
- /usr/local/bin — VirtualBox
- /usr/local/bin — VirtualBoxVM
- /usr/local/bin — VBoxManage
- /usr/local/bin — VBoxVRDP
- /usr/local/bin — VBoxHeadless
- /usr/local/bin — VBoxBugReport
- /usr/local/bin — VBoxBalloonCtrl
- /usr/local/bin — VBoxAutostart
- /usr/local/bin — VBoxAudioTest
- /usr/local/bin — vbox-img
- /usr/local/bin — vboximg-mount
- /Library/LaunchAgents — org.virtualbox.vboxwebsrv.plist
- /Library/LaunchDaemons — org.virtualbox.startup.plist
- /Library/Application Support — VirtualBox
- Restart your Mac. If everything works normally, you can choose to empty the Trash.
Optional: How to Remove the VirtualBox VMs Folder
If you want to free up additional storage from your Mac after uninstalling VirtualBox, you must delete the contents of the VirtualBox VMs directory. It houses your OS X, Windows, and Linux operating system disk images.
The folder is located within the root of your Mac user account. To get to it, type the following into a Go to Folder box and press Return:

Each virtual machine resides inside a sub-folder inside the directory. Trash any VM you don’t need.
Warning: If you’re planning to reinstall VirtualBox later, consider keeping the images or moving them to an external storage device. If you delete the VMs, you permanently lose all data inside them.
VirtualBox Fully Uninstalled on Mac
Using the VirtualBox Uninstall Tool is the best approach for a thorough VirtualBox uninstallation on your Mac. Use an app removal utility if that fails, or take matters into your own hands and remove the application and all of its leftovers manually. Also, don’t forget to deal with your virtual machine disk images separately.