The HOME directory has a limited quota, and you can check the current usage with the tools described here.*
Sometimes it is not easy to figure out which directories are using the most space. For this, have a look at the command du
For example, the following command shows you the space taken up by the subdirectories of the directory from where you run the command
du -h --apparent --max-depth=1 .
Notice the the last “.” stands for “the current directory”. In our experience, there are a few typical situation where users do not realize that they are actually using a lot of space:
- Trashbin
- Files cached when installing local packages (conda, pip…)
- VSCcode remote
- Huggingface
- Weight & Biases
- Temporary files from programs (MATLAB, COMSOL, ANSYS, …)
Trashbin
The most common situation: users delete files from the thinlinc GUI, and select the Move to Trash option.
This is generally a good idea, because it does not delete the file, but it only moves it in the trash folder
.local/share/Trash
This is just a normal folder under the user’s HOME directory, and therefore the deletion is reversible. But this does not free up space. To free up space, the trashbin must be emptied.
- If you have access via ThinLinc, just:
-
- open the file manager
- right click on the Trash icon
- select Empty Trash
- If you want or need to do this from the command line, just run the following command from the terminal
rm -rvf $HOME/.local/share/Trash/*
BE CAREFUL. Use this command exactly as it is. If you accidentally insert spaces or other symbols, you could end up deleting a lot more than you think.
pip, conda, uv
When one install packages locally with pip or conda, those tools store a local copy of all the packages that they install, to save time in re-downloading them if you need to install the same exact version of the package later. But those archives take up a lot of space, easily several GB.
pip
For pip, the packages are stored under
.cache/pip/http/
It is a hidden directory, whose name starts with a “dot”. You can delete the files in this directory.
NOTE: recent versions of pip have introduced an option to clear this cache:
pip cache remove package-name
to remove the cache related to a specific package, or
pip cache purge
to remove the whole cache.
conda
most of the space that conda uses is to store the tarball archives of the packages installed. conda has a clean option that can be used to check how much space those archive take, and to remove them.
To check the status use the command
conda clean -t --dry-run
and if it is ok and you want to delete all the archive, run the command
conda clean -t
Or a more aggressive option:
conda clean --all
uv
most of the space that uv uses is to store the tarball archives of the packages installed. uv has a cache option that can be used to clean the stored packages.
uv cache clean
VSCode remote
Visual Studio Code remote extension installs the remote server on the HOME directory, in a hidden directory called .vscode-server
.
In this directory the vscode server is installed, as well as the extensions one uses. All those extensions take up space. Moreover, VSCode remote updates automatically, keeps a copy of the last 5 versions. Each of them takes up the roughly the same amount of space.
To clean up follow the official instructions.
RECOMMENDED: by default VSCode also send back-home telemetry data. You can disable this, following these instructions.
Huggingface
Hugging Face keeps by default a copy of the monitoring data in a hidden directory under HOME, specifically.cache/huggingface
This directory can become very large, and is not deleted automatically.
First, keep an eye on this directory, and delete it regularly: rm -rvf $HOME/.cache/huggingface/*
Second, if you have a scratch directory, change the default location of the Hugging Face cache directory using the HF_HOME
environment variable, as explained here.
Weight & Biases
Weight & Biases keeps by default its artifacts files in your HOME directory, under .cache/wandb
and its log files under .wandb
.
You can change the default location making use of environment variables, as explained on their documentation page.
Temporary files from specific applications
Please consult the application manual to figure out if and where the program stores large configuration or temporary files.