0

Situation

Last year I have created an Ubuntu Virtual Machine I don't want to use anymore. I allocated 195 Go to a partition (D) for the VM. I have already uninstalled the VM. Now I want to delete D so I have deleted all the files on it and when I enter the partition with the explorer, it says the partition is empty.

Problems

  • When I look at the page listing all my drives and partitions, the explorer says D contains 16.9 Go of datas.
  • When I try to format D, I have a message saying D is opened in another application or process, but all my applications are closed. I also try to reboot the computer then format D but it still shows the same message.
  • I tried to use the disk manager and right click on D but the option "Delete volume" is not available : Disk management
  • So I clicked on the option "Shrink volume" and I reduced D to the maximum. I hoped I could reduce it to 0 Go but it doesn't want to go below 24.8 Go. Moreover I now have a 170.51 Go non allocated partition which is the remaining space of the 195 Go I have shrinked before. I thought this non allocated memory would be added to the C partition but it didn't. I tried to right click on C and choose "Extend volume" but the option is not available.
  • I found this https://www.windowscentral.com/how-delete-drive-partition-windows-10. So with the PowerShell, I executed commands to delete D but it didn't work : PowerShell 1 PowerShell 2

Questions

  • Does D still contains remaining files (e.g. system files or files created by the VM) I have to delete ? Is it dangerous for my computer or my datas if I don't delete them correctly ?
  • How can I delete D ?
  • How can I allocate the non allocated memory to C ?
  • I have WSL 2 installed. Can it help to format D ?
4
  • Please provide a screenshot of Disk Management. Also, only you can answer the question whether there are files on that partition. You could use TreeSize Free (as Admin) to check.
    – Daniel B
    Commented Jul 10, 2021 at 15:56
  • Boot a Linux Live USB to format or delete the partition. Nothing can stop this (just ensure this is the right partition...).
    – harrymc
    Commented Jul 10, 2021 at 17:10
  • @harrymc Can I do this with WSL 2 ?
    – shrimp
    Commented Jul 10, 2021 at 17:14
  • Whatever is preventing this is in Windows, and WSL runs on Windows, so it shouldn't work (unless a bug in WSL).
    – harrymc
    Commented Jul 10, 2021 at 17:16

1 Answer 1

1

From the Disk Management screenshot is now clear why the partition is in use: It contains a paging file.

Disable it and you will be able to delete the partition. Go to the settings app, SystemAbout on the left → System info on the right → Advanced system settings on the left → Advanced tab → Change under Virtual memory. From there, you will be able to manipulate the settings. I recommend using System managed size on C: and None for all other partitions. You will have to reboot for the change to take effect.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .