Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have installed Windows XP in my VirtualBox some days ago. Now, I want to remove Windows XP completely from VirtualBox and I decided to install Ubuntu 13.04 for testing.

What is the correct way to remove completely Windows XP from VirtualBox?

share|improve this question

1 Answer 1

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

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.

enter image description here

We will then be asked whether we wish to only remove the machine (i.e. unregister it) or if we want to also "Delete all files". The latter will completely remove the virtual machine with all files from our drive.

enter image description here


Command line

This can also be done from command line with the following command:

VBoxManage unregistervm --delete "<Name of Machine>"

By doing so the following files will be deleted:

  • all hard disk image files, including differencing files, which are used by the machine and not shared with other machines;
  • saved state files that the machine created, if any (one if the machine was in "saved" state and one for each online snapshot);
  • the machine XML file and its backups;
  • the machine log files, if any;
  • the machine directory, if it is empty after having deleted all the above.

Source: Virtual Box Manual

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.