How to get under quota

Let us consider an example for an undergraduate user named foo, who is over disk quota and has received email warnings.

Step 1. Determine your total disk usage.

Enter the following command to see your present disk quota:

csquota

The command would take some time, and returns:

Calculating your disk usage...
[▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓]

You are using 10000000 KB blocks of your allowed 8000000 KB blocks (125.00%)
You are over your quota by ~1953.13 MB.

We see that the user is over by 1953.13 MB. So ~2GB of stuff needs to be cleaned up.


Step 2. Find the largest sub-directories or files in the home directory

Use the command below to list the usage:

cd; du -sh * .??* | sort -rh | more

Let’s assume the command shows an output like:

1.6G	.cache
1.2G    Downloads
48M	    Desktop
34M	    Pictures

We see that there is ~1.6G of data under the .cache directory and another 1.2G in Downloads. So, we need to start working from here.


If you see .vscode-server directory taking up a lot of space, please re-configure your remote VSCode connection as shown in the “Troubleshooting” section of the Using VS Code web page.

Step 3. Go into the first largest sub-directory

Go into .cache, and run the du command:

cd .cache; du -sh * .??* | sort -rh | more

Assume the command returns with:

1.2G	google-chrome
300M	mozilla
38M	    tracker
25M	    thumbnails
23M	    composer

We see that google-chrome directory is taking more than a gigabyte of disk space. It can be deleted safely, via:

rm -rf google-chrome

Step 4. Keep repeating Step 3 for next largest sub-directories/files

In this example, we’ll do this once more. Let’s now go into Downloads, and run the same du command:

cd ~/Downloads; du -sh * .??* | sort -rh | more

Let’s say the command shows the following output this time:

1.1G	colinux.1.3.37.tar.gz
70M	    treble.zip
37M     image.pdf
23M	    copy.jpeg

Assume that we determine the file colinux.1.3.37.tar.gz, which is taking up more than a gigabyte can be deleted. Delete this file by the command:

rm colinux.1.3.37.tar.gz

Step 5. Repeat Step 1

Now let’s do Step 1 to see how much disk the user foo is using:

cd; du -sh .

The command would take some time, and returns:

7.7G

We see that the user foo is under the disk quota now.