Troubleshooting · Computer Systems
Disk quota full on the course server
Cannot save or create files on the server? Check the quota, find the hidden directory that fills it – almost always ~/.cache – delete what is safe, and check again. Plus the fix for a failing graphical login on lab machines.
Every user on the course server has a fixed amount of disk space, the quota – about 500 MB. When it is full, you cannot create or upload new files any more – and the space is usually taken by hidden directories, not by your own work.
You probably have this problem if:
- your editor cannot save a file;
touch,mkdir,cpor an upload fail withDisk quota exceeded;- at login you see a quota table with
100%and<<WARNING; - on a lab machine, logging in to the graphical desktop fails.
The short version: runquota; if it says 100%, the space is almost always in the hidden~/.cachedirectory. Delete what's inside it and runquotaagain. The steps below show how to check each part before you delete anything.
Step 1: confirm it's the quota
The server prints your quota when you log in, and the quota command prints it again at any time:
quota – a full one
Disk quotas for user abc123 (uid 12345): none
Volume Name Quota Used %Used Partition
user.abc123 512000 512136 100%<< 44% <<WARNING| Column | Meaning |
|---|---|
Quota | The space you have, in KB – 512000 KB is about 500 MB. |
Used | The space you currently use. |
%Used | At 100% nothing more can be written. << marks the problem. |
what a full quota looks like in the shell
$ touch notes.txt
touch: cannot touch 'notes.txt': Disk quota exceeded
$ mkdir exercise
mkdir: cannot create directory 'exercise': Disk quota exceededStep 2: find what is using the space
Run ls in your home directory and you'll see a few small folders – nothing that could fill 500 MB. That's the trap: the space is taken by hidden directories, whose names start with a dot. ls doesn't list them without -a, and du -hsc * doesn't count them either, because * doesn't match names starting with a dot.
List every directory directly in your home – hidden ones included – with its size in MB, biggest first:
cd ~
find . -mindepth 1 -maxdepth 1 -type d -exec du -sm {} + | sort -nrexample output
431 ./.cache
58 ./.vscode-server
5 ./.local
2 ./Exercise_6
1 ./scripts| Part | What it does |
|---|---|
find . | Start in the current directory (your home, after cd ~). |
-mindepth 1 -maxdepth 1 | Only the entries directly in it: not . itself, not deeper. |
-type d | Directories only. |
-exec du -sm {} + | Run du on them: -s one total per directory, -m in MB. |
sort -nr | Sort numerically, largest first. |
Two shorter alternatives – you need both, because neither covers everything:
du -hsc * # visible files and directories + total
du -hsc .[!.]* # hidden ones (names starting with .) + totalStep 3: delete what is safe to delete
The usual culprit: ~/.cache
~/.cache fills up first. It holds caches – mostly of Chrome, Firefox, MS Teams and VS Code. Look at what is big inside it:
du -hsc ~/.cache/*
du -sm ~/.cache/* | sort -nr | head # the same, biggest firstThen delete the large directories, for example:
rm -rf ~/.cache/google-chrome
rm -rf ~/.cache/mozillaor the whole content of the cache at once:
rm -rf ~/.cache/*Programs recreate their cache when they need it, so deleting ~/.cache loses no data.
Other common space users
| Directory | What is in it | Safe to delete? |
|---|---|---|
~/.cache | Caches of browsers, Teams, VS Code | Yes |
~/.vscode-server | The server-side part of VS Code Remote-SSH | Yes – it is reinstalled on your next connection |
~/.local/share/Trash | The graphical desktop's recycle bin | Yes – this empties the bin for good |
Step 4: check again
Run quota once more. Once %Used is below 100%, everything works again. If it's still full, go back to step 2 and look one level deeper into the biggest directory.
If you can't log in graphically on a lab machine
If your quota is full, logging in to the graphical desktop may also fail. Clean up from a text console instead:
- Press one of
Ctrl + Alt + F1…Ctrl + Alt + F6to switch to a text console. On the lab machines onlyCtrl + Alt + F1andCtrl + Alt + F6work. - Log in with your username and password.
- Free up space as in steps 1–4.
- Press
Alt + F7to switch back to the graphical screen – the login works now.
The same cleanup works on the faculty's other Linux machines too – pandora, opsys, the course server and the lab machines.
Keep it from happening again
- Glance at the quota table when you log in. At 80–90% clean up now, not the night before a deadline.
- Don't keep large downloads, archives or videos in your home on the server; it is for scripts and text files.
Quick reference
quota # 1. is it the quota?
cd ~
find . -mindepth 1 -maxdepth 1 -type d -exec du -sm {} + | sort -nr # 2. what is big?
du -hsc ~/.cache/* # 3. what is in the cache?
rm -rf ~/.cache/<directory> # 4. delete the cache
quota # 5. check again