How to Remove a Virtual Machine in Oracle VirtualBox
Learn how to remove a VM from VirtualBox Manager, keep its files for later use, or permanently delete its disks and configuration to reclaim storage.
A virtual machine (VM) is a software-defined computer managed by Oracle VirtualBox. When a VM is no longer needed, you can remove it from VirtualBox Manager, the graphical interface used to view, configure, start, and manage VMs.
VirtualBox gives you two different removal choices: remove the VM from the Manager's machine list while keeping its files, or remove it and delete its associated files. Choose carefully, because deleting the files can permanently remove the virtual machine's configuration and virtual disks from local storage.
Understand the Two Removal Choices
Removing a VM does not always mean deleting everything belonging to it. The removal confirmation dialog lets you decide whether to unregister the VM only or delete its associated files as well.
| Option | Effect in VirtualBox Manager | Effect on VM files | Best use case |
|---|---|---|---|
| Remove from the machine list only | Unregisters the VM so it no longer appears in the Manager list. | Preserves the configuration and virtual disk files on the host. | Keep the VM for later use, recovery, or re-registration. |
| Remove and delete associated files | Unregisters the VM and removes it from the Manager list. | Deletes the VM's associated files, including its configuration and virtual disks. | Permanently clean up an obsolete VM and reclaim disk space. |
What Does Unregister Mean?
Unregister means removing the VM's registration from VirtualBox Manager without necessarily deleting the files stored on the host computer. This is the safer choice when you might need the VM again or want to retain its virtual disk.
After unregistering, the VM is no longer available in the current machine list, but its files remain on disk. Those files can potentially be added back to VirtualBox later using the appropriate existing-VM or configuration file workflow.
What Are Associated Files?
Associated files are files belonging to the VM. They commonly include the VM configuration and virtual disk files, which contain the guest operating system, applications, and data. Deleting them is a storage cleanup operation, not merely a change to the Manager list.
Before Removing a Virtual Machine
- Confirm that the VM is no longer needed, or decide that you want to keep its files.
- Make sure important files inside the guest operating system have been copied or backed up.
- If you might use the VM again, choose removal from the machine list only.
- If your goal is to reclaim disk space, verify that the VM and all data stored in its virtual disks are no longer required.
- Check whether the VM has snapshots or other related storage that you also need to retain.
Remove a VM from VirtualBox Manager
- Open VirtualBox Manager.
- Find the target VM in the machine list.
- Check its power state. If it is running, shut it down or power it off.
- Select the VM.
- Right-click the selected VM to open its context menu. A context menu is the menu displayed for an item after you right-click it.
- Choose Remove.
- Read the removal confirmation dialog and select the appropriate option.
- Confirm the operation.
If you select the option that removes the VM from the machine list only, VirtualBox unregisters the VM but leaves its files on the host. If you select the option to delete associated files, VirtualBox removes the registration and deletes the VM's local files.
Example: Keep the VM Files for Later
Use this procedure when an unused VM may be needed again:
- Shut down or power off the VM.
- Right-click the VM in VirtualBox Manager and choose Remove.
- In the confirmation dialog, choose the option that removes the VM only from the machine list.
- Confirm the removal.
The VM disappears from the Manager list, but its configuration and virtual disk files remain available on the host. This option is useful when you want to retain the guest system without having it displayed among your active VMs.
Example: Permanently Delete an Obsolete Test VM
Use this procedure only when you are certain that the VM and its data are no longer needed:
- Verify that the VM is powered off.
- Copy or back up any data you may need later.
- Right-click the VM and choose Remove.
- Choose the confirmation option to delete the associated files.
- Confirm the deletion.
This removes the VM from VirtualBox Manager and deletes its local configuration and virtual disk files, making it suitable for permanent cleanup and disk-space recovery.
Troubleshooting VM Removal
The Remove Command Is Disabled
The selected VM is probably still running. Shut down the guest operating system or power off the VM, then select it again in VirtualBox Manager and open its context menu. The Remove command becomes available only when the VM is not running.
You Are Unsure Whether to Delete the Files
Choose removal from the machine list only if you may need the VM again, need to preserve its virtual disks, or have not checked its data. Choose deletion only after confirming that the VM is obsolete and that required backups exist.
Related VirtualBox Tasks
Learn how to move a virtual machine when you want to keep it but relocate its files. For a separate copy, see how to clone a virtual machine. To understand the storage that may be affected by deletion, review virtual disks and disk image files.