I'm using VirtualBox with some virtual machines, but it just increases the disk size every time I open and close it without doing anything, I asked several communities, and they said that swap files are created and not enough RAM and stuffs like that, how do I clear this "increased spaces for no reason" files? It must have a solution, cause when I reinstall the VM disk before doing anything and after the disk ate so many spaces, the disk size reset to the size first when I install it and nothing is changed, I've searched on the internet and google gave me some solutions like shrinking VirtualBox to save spaces and stuffs like that. I want to stop this increase for no reason, or a solution to clear those "ate spaces for no reason" files manually, what do I do? Shrink VirtualBox by following this link?: https://www.maketecheasier.com/shrink-your-virtualbox-vm/
fstrim ...
on each mounted writable partition. Then VirtualBox should recognize the free blocks and use them the next time in need to write a block. Hopefull the image should not grow as long as you regularity execute fstrim and do not use more HDD space in the VM.