I am using the Ubuntu linux subsystem on Windows 10 to run Qiime2, but I ran into an issue with a pre-trained Silva classifier. I started a run on my sequences last night, but it used up nearly all of my disc space. Where can I find the huge files it created and delete them?
Thanks!
@wormguy, Ubuntu (and other linux distros) generally clean up /tmp automatically before or after use. You might try rebooting the WSL, and if that doesn't help, try rebooting Win10.
If that still doesn't help, and if you are certain this is a disk space issue, not, e.g., an out-of-memory error you've encountered, you might take a look at what's laying around in your Ubuntu partition's /tmp/ directory. The following will get you to tmp and list the directories there with human-readable sizes. If it looks like there are qiime 2 directories there that are eating up a lot of space, you could try manually deleting them. (not while QIIME 2 processes are running, please!).
Note: you'll probably need to use sudo to run some of these commands. be careful!
cd /tmp
ls -lah
# ..... if you find some big unneeded temp files
rm -r some_big_huge_directory
Some additional background:
Automatic /tmp cleanup may not happen on WSL linux instances (1, 2), or may require manual intervention or user configured cron jobs. These linked issues have been closed, but not because there's been a targeted fix to the issues. Rather, support for user-configured cron jobs has been set up.
Thanks for the reply. I cleared out all the qiime2 files from /tmp, but my disk still remains full. It may be unrelated to running the classifier, but I only got the low disk space alert after I ran it on Ubuntu.
Sounds like we're going to have to think about this some more! I don't have a windows box to play around with right now, @wormguy, but I can throw some ideas at you, and maybe we'll both learn something.
Does your storage appear to be near-full in your windows file explorer? I want to confirm that this out of disk space issue is impacting your windows machine, and not just the Ubuntu VM in WSL. The rest of this response assumes you answered yes to this question.
From the Ubuntu terminal, check what directories are taking up the most space. This command will check the disk usage du of everything in your current directory, sort them largest-first, and display the top 10.
sudo du -h | sort -hr | head
If you navigate to /, run this, and drill down as needed, you can figure out whether there are directories of junk wasting space. ( If you've got the space, a disk profiler like ncdu would probably make this easier)
If you can confirm you're no longer actually using a lot of disk space in WSL, but the problem remains, you may be dealing with this issue. Apparently WSL2 doesn't automatically reduce the disk allocation of the virtual machine when files are removed. The issue linked many workarounds. This guy's video shows one workaround in action.
Hopefully this helps, and double-hopefully you don't end up having to manually resize your virtual hard disk every time you run a storage-intensive command.