Local drives – which are typically represented by letters C (for the system drive), D, and so on – correspond to logical partitions of your hard disk. Physical divisions always exist on your system. You can observe them via This PC in Windows 10 or My Computer in older versions of Windows (Windows 7, especially).
Virtual hard drives (VHDs) are a bit different, though. They are quite similar to external drives in that they can be used for various purposes or functions. However, after you complete a task where a virtual drive is needed, you will probably have no use for the drive. In that case, you might want to get rid of it – and you should get rid of it.
Your physical hard disk drive has a limited capacity. All disks are limited in size, to be fair. Therefore, to recover space, you are better off deleting virtual hard drives – once you have no use for them. Well, in this guide, we intend to show you how to delete a VHD in Windows 10. Let’s go.
How to remove a virtual drive from a PC in Windows 10
We know of several procedures through which you can get rid of a virtual drive in Windows 10. We will describe only the most straightforward paths, though.
How to delete a virtual disk drive through My PC in File Explorer:
Here, you are going to go through the parent directory for stuff on your computer and use the options that apply to it to remove the unwanted virtual drive. These are the instructions you must follow to do the job:
- First, you have to launch the File Explorer app by clicking on its icon on your taskbar.
Otherwise – if the needed File Explorer icon is missing from your taskbar – you have to use this keyboard shortcut to perform the program launch task: Windows logo button + letter E.
- Once the File Explorer window comes up, you have to locate This PC and then click on it.
- Now, assuming the virtual drive you intend to get rid of is now visible, you have to click on it to get it highlighted, right-click on it to see some options, and then choose Properties.
Windows will bring up the Properties window for the chosen virtual drive now.
- Click on the Hardware tab to go there. Click on your virtual disk to get it highlighted (under the All disk drives section).
- Click on the Properties button (close to the bottom of the window).
Windows will bring up another Properties window now.
- Click on the Driver tab to go there. Click on the Disable Device button to proceed.
- Now, you must click on Uninstall Device.
Windows will now apply the Uninstall the device from System (Advanced) option.
- Click on the Yes or Restart button – if Windows brings up a reboot prompt.
Otherwise – if the prompt fails to show up or if you do not want to restart your PC now – you have to save all your work and then initiate the reboot operation on your own or manually (from the Power option on the Windows Start menu or screen).
- After the recommended reboot, you have to launch the File Explorer program again (by clicking on its icon on your taskbar or using the keyboard shortcut we recommended earlier).
- After the File Explorer window comes up, you have to enter My PC (as you did earlier) and then check for the virtual drive you have deleted.
If the virtual drive still exists or if it is grayed out, then you have to try the next method or procedure.
How to delete a virtual drive using the Disk Management console:
Microsoft provided the Disk Management console as a special utility in Windows through which users can perform all sorts of operations involving disks, drives, partitions, and similar attributes or items. Of course, it is only natural that virtual drive removal operations are executed on the platform.
If the previous procedure (involving This PC in File Explorer) failed you, then you can rest easy knowing that you are more likely to succeed with the Disk Management console method. In any case, you must go through these steps to delete an unwanted virtual drive in Windows:
- First, you have to fire up the Run application through the Windows logo button + letter R keyboard shortcut.
- Once Windows brings up the small Run window, you have to fill the text box on it with the following code:
- Give the Enter button on your keyboard a tap to force Windows to run the code (or click on the OK button on the Run window for the same outcome).
Your system will bring up the Disk Management utility window now.
- Check for the virtual disk you want to remove under the Volume column, click on the unwanted virtual disk to get it highlighted, right-click on it to see the context menu available, and then select the Delete volume
Windows will bring up a dialog or prompt and ask you to back up your data before deleting the volume. You have to decide if you want to save a copy of the data stored on the virtual drive or if you want nothing to do with it. If it is the former, then you will have to minimize the current windows and create the necessary backup.
- Assuming you are ready to get rid of the virtual drive in view, you have to click on the Yes option.
Windows will now get on with the virtual drive removal operation. You will end up with unallocated virtual drive space.
Your job is not finished. At this point, you have to continue with the instructions below to get rid of the virtual hard disk file (associated with the drive you removed):
- On the same Disk Management utility window, you have to click on the disk number with the unallocated space to get it highlighted.
- Now, you must right-click on the highlighted entry to see the context menu available for it and then select the Detach VHD option.
- On the window or dialog that follows, you have to click on the Delete the virtual hard disk file after removing the disk
- Click on the OK button. That should be all – or at least, your work on the Disk Management utility window is done.
- Now, you must launch the File Explorer application through whatever method you prefer.
- After the File Explorer window appears, you have to launch My PC and then check for the unwanted virtual drive.
Well, the virtual drive is not supposed to be there – since you executed the removal operation for it in the Disk Management console.
- If the unwanted virtual drive is still present, then you have to click on it to get it highlighted, right-click on it to see the options available, and then choose Delete.
Yes, given the work you did earlier, you will be able to get rid of the unwanted virtual drive entry in the File Explorer application through the regular delete procedure used on files or items in the Windows operating system environment.
Note: If you are unable to delete the unwanted virtual drive for any reason or if you cannot remove its entry displayed in the File Explorer application (even after the removal operation in the Disk Management utility was executed), then you have to restart your computer and try things again.
You can redo the simple procedure to remove the unwanted virtual drive entry in File Explorer (if this is your only worry), or you might have to reattempt the entirety of the operation (if you never got far in the first place).
How to delete virtual drives using the Diskpart command-line utility in Command Prompt:
You are probably used to running commands on the platform provided by Command Prompt, which is a popular utility for command-line operations. Well, there is an alternative method or procedure – which involves Command Prompt and a specific command-line utility (Diskpart) – through which you can delete a virtual hard drive in Windows 10. You might prefer the path here for some reason.
Anyway, these are the instructions you must follow to delete a virtual drive using Diskpart in Command Prompt:
- Press the Windows logo button on your machine’s keyboard to access the Windows Start menu options and utilities (or you can click on the Windows icon on your PC’s screen to see the same thing).
- Input Command Prompt into the text box (that appears the moment you begin to type) to perform a search operation using those keywords as the query.
- After Command Prompt (App) comes up as the main or only entry on the search result list, you have to right-click on it to see its context menu there and then choose the Run as administrator option.
Windows will now bring up the Administrator: Command Prompt window on your PC screen. Yes, you can only do the job on an elevated Command Prompt window because Windows needs administrative rights or powers to execute top-level operations on your behalf.
- Now, you must execute the following code (by typing it in first and then hitting the Enter button on your keyboard to force Windows to run it):
- At this point, you have to specify the unwanted virtual drive by executing this command: select vdisk file=<VHD file>
The <VHD file> part of the code above must be replaced with the actual VHD file title.
- Now, you must execute the following command to perform the main task:
Windows will now work to detach the virtual drive. Your work here is done.
- You can now close the Command Prompt window.
- Open the File Explorer application through your preferred method, enter This PC, and then check and confirm that everything is now in order as regards the virtual drive you worked to delete.
- If Windows still lists the unwanted virtual drive in File Explorer, then you have to restart your PC and then check again.
We believe you now know how to delete virtual hard drives in Windows 10. Considering the lengths you were willing to go to get rid of an unwanted VHD, you probably succeeded in recovering some valuable hard drive space on your disk.
If you ever need to update the driver for a device on your computer, then you can download and run Auslogics Driver Updater. This way, you get to spare yourself of the stress, risks, complications, and problems associated with the operations that make up the driver update process. In fact, the recommended program can help you fetch and install the newest manufacturer-recommended drivers for almost all the components in your computer – and it will perform the task in little time.