
It should look like this: cd "C:\path\to\folder"įor example, if you extracted the sdelete.exe file to your user account’s download folder and your Windows username is Bob, you’d run the following command: cd "C:\Users\bob\Downloads" Be sure to enclose the path in quotation marks if it contains a space character. Run the following command: sdelete.exe c: -z To quickly fill in the directory path, simply type cd into the Command Prompt window, press Space, and then drag and drop the folder icon from the file manager’s address bar. This will write zeros to all the free disk space on drive C. If you want to shrink a secondary drive located at a different drive letter in the virtual machine, type its drive letter instead of c. As the SDelete page on Microsoft’s website notes, the -z option is “good for virtual disk optimization”. You’ll be asked to agree to the tool’s license agreement before continuing. When it’s done, shut down your virtual machine using the “Shut Down” option in its Start menu. If you have Linux installed in the virtual machine-a Linux guest operating system instead of a Windows guest operating system, in other words-you can skip the defragmentation process and use built-in commands to zero the free space on the drive. We’ll use Ubuntu as the example here, but the process will be similar on other Linux distributions. To do this, you’ll first need to install the zerofree utility inside the virtual machine. It should be available in your Linux distribution’s software repositories.

#Is virtualbox safe installįor example, you can install it on Ubuntu by running the following command at the terminal inside your virtual machine: sudo apt install zerofree #Is virtualbox safe software You can’t actually use zerofree on your / partition while you’re booted into the standard Linux environment. Instead, you’ll want to boot into a special recovery mode where your normal root partition isn’t mounted. On Ubuntu, restart your virtual machine, and repeatedly press the “Esc” key while it’s booting to access the Grub menu.
