This question already has an answer here:
I am running OS X Sierra on a 2016 Macbook Air.
I installed VirtualBox recently, and had 48 GB of free space after installation. I then set up an Ubuntu VM with a 10 GB hard drive. After 20 minutes of playing around, I deleted the VM.
Upon checking my free space, I saw that I now have only 46 GB left. Undoubtedly, VirtualBox left some files undeleted because I did not install/download/transfer anything else in that time. I even went to the path where the VMs are stored on my real hard drive and deleted that directory, but it still didn't help.
I can't afford to lose 2 GB every time I delete a VM. I am on a lightweight Macbook Air and memory space is very valuable to me. Any help would be appreciated, thanks.
EDIT: This eating up of space is most definitely due to VirtualBox. I created and deleted another Ubuntu VM instance and sure enough, lost out on another 2 GB.