You can then use the UI to delete the VM. Once the process is killed, the VirtualBox UI will show the VM state as Aborted. MyHostName:homedir ayekay$ kill -9 1196 89252 Do I need to uninstall VirtualBox before updating 3 Answers. Find the program you want to uninstall, click it to select it, and then click Uninstall. Go to Programs and Features (if your Control Panel is in Category view, go to Uninstall a Program). Get the process id of the VirtualBox processes associated with that VM and kill it. Assume the name of your locked / bad vm is My-Locked-VM. If the issue still persists, you can also kill the VBoxHeadless & VirtualBoxVM processes associated with the VM.Į.g. the machine directory, if it is empty after having deleted all the above.saved state files that the machine created, if any (one if the machine was in "saved" state and one for each online snapshot).all hard disk image files, including differencing files, which are used by the machine and not shared with other machines.This can also be done from command line with the following command: VBoxManage unregistervm -delete ""īy doing so the following files will be deleted: The latter will completely remove the virtual machine with all files from our drive. unregister it) or if we want to also "Delete all files". We will then be asked whether we wish to only remove the machine (i.e. In the graphical frontend for Virtual Box we can easily remove a virtual machine by selecting the machine to remove and go to the menu entry "Machine -> Remove" or choose "Remove" from the right-click context menu. VirtualBox.Īt this point, all of your previous VirtualBox installation should have been removed.It makes no sense to keep a particular Virtual Machine and change the OS inside - so remove the VM and create a new one: Virtual Box Manager Try removing without sudo at first (since it is located in your home folder, you should have the ability to do so) rm -rf. config and look for a folder named VirtualBox. From your home directory, change into your. Technically, when running your apt-get remove with purge, all config files should have been targeted, but it is good to check anyway. If all else fails, and it makes sense, use sudo: sudo rm -rf. If you run into file permission problems, you can try to take ownership and then try deleting without sudo sudo chown `whoami` -R. "VirtualBox VMs" (you need to use double quotes around the folder name because of the space). If you see the directory “VirtualBox VMs”, you can try to delete without sudo first rm -rf. Browse to your home directory (you can usually just type cd and hit enter).ģ. If you don’t want to remove VMs, don’t complete this step.īecause “sudo rm -rf” is destructive, check to see if you even need to use the command by locating the files and attempting to delete without sudo.ġ. Always pay attention to what your command is doing before hitting enter.ĪNOTHER NOTE: This will remove all VMs that have been installed to the default home folder location. NOTE: The sudo rm command with -rf is a very destructive command. Step 2: Remove all VMs from Home Directory To also remove all of the VMs stored in the home directory, move to the next step. The purge option also triggers removal of any configuration files. Identifies virtualbox packages to ensure all versions are targeted by using the asterisk wildcard.Ģ. To uninstall and remove all packages, run sudo apt-get remove virtualbox* -purgeġ. If you are interested in checking out all of the package versions on your system before uninstalling, you can run dpkg -l | grep virtualbox Step 1: Completely Remove All VirtualBox Packages and Folders from Ubuntu I am creating this post as a future reference (mostly for the home folder info) but also to share. I recently had to make some updates to my VirtualBox and Vagrant installations and decided to completely uninstall VirtualBox to reinstall the newest version to start fresh.