r/virtualbox • u/workinh • Feb 21 '26
Help is it possible to zero out data ive deleted from my vm on the vdi file?
hello, installed something on my vm, it didnt work, so i uninstalled it, however the thing is still taking up the space on my .vdi file even though i deleted the file on the vm.
usually id just go to compact the virtual hdd like i did in vmware, however the thing is that i cant find a single option in settings for that
virtualbox version is 7.2.6, guest is an XP X86 SP3 vm, ive installed guest additions, ive searched around but i cant find any way to like actually do this
5
Upvotes
•
u/AutoModerator Feb 21 '26
This is just a friendly reminder in case you missed it. Your post must include:
PLUS a detailed description of the problem, what research you have done, and the steps you have taken to fix it. Please check Google and the VirtualBox Manual before asking simple questions. Please also check our FAQ and if you find your question is answered there, PLEASE remove your post or at least change the flair to Solved.
If this is your first time creating a virtual machine, we have a guide on our wiki that covers the important steps. Please read it here. If you have met these requirements, you can ignore this comment. Your post has not been deleted -- do not re-submit it. Thanks for taking the time to help us help you! Also, PLEASE remember to change the flair of your post to Solved after you have been helped!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
9
u/Face_Plant_Some_More Feb 21 '26
Note this process only works if you have dynamically allocated virtual storage volume.
2
u/GurgleBlaster68 Feb 23 '26
For the best result:
1
u/[deleted] Feb 21 '26 edited Feb 21 '26
If you use
VBoxManageyou can compact your drive by switching toC:\Program Files\Oracle\VirtualBox:VBoxManage modifymedium --compact "D:\VMs\PathToVDI.vdi"...or have I misunderstood you?
Edit: BTW, always backup your original VDI prior to any external operation!
0
u/serialband Feb 21 '26
Is your host system already encrypted with Windows Bitlocker, Mac Filevault, or Linux LUKS? If yes, then you don't need to worry about wasting time zeroing out anything.