Disk Quota

Disk quotas at CSE

The amount of disk space you can use in your home directory is limited. This limit is called your disk quota.

If files in your home directory take up too much disk space, you will be unable to save any more files (or changes to existing ones) until you free up space.

Checking your disk quota

To check your disk quota, open a terminal on a lab machine or login server and run the rquota command.

You should see something like the following: Disk quotas for user z1234567 (uid 12345): Filesystem space quota limit grace files quota limit grace /export/ravel/1 382M 620M 850M 9629 457k 513k

The numbers you care about are the first three:

  • space - Your current usage of allocated space(in MB)
  • quota - Your quota, with period of grace
  • limit - Your quota, hard limit without grace

If you are using less space than your quota, then you are fine.

If you are using more space than your quota, then you will need to delete some files.

If you go over your quota

To prevent one file from suddenly preventing you from saving, there is a grace period system.

You can go over your quota for a week, but you cannot go over your limit.

If you exceed your quota:

  • You will receive a warning mail.
  • For one week, you will be able to store up to your limit.
  • After the end of that week, you will not be able to save anything until you go back under your quota

Deleting files

You can select files to delete in the Desktop File Browser. Note that deleting files that way really moves them to the Trash folder, which is still in your home directory. You need to Empty the Trash to removed the files.

You can directly remove files using console commands: rm -rI directory or: rm -I filename

Be careful, as files deleted this way do not go into the Trash, and cannot be undeleted.

(There may be backups available; if you make a mistake, contact System Support, who can check for you.)

Reducing the file space used

Empty the Trash Folder

Sending files to Trash rather than deleting them outright will leave them in your account where they will still use your quota.

Files moved to Trash go to this subdirectory in your home directory: .local/share/Trash/files/

Also, when you are over quota, the normal "Empty Trash" action from the Desktop may not work. Instead:

  • Delete the files directly from the command line. Eg: rm ~/.local/share/Trash/files/filename
  • Delete all trash with one command: trash-empty

Command-line programs for Trash

List Trash contents
Delete Trash older than 7 days
trash-empty 7
Delete all Trash

Automatic cleanup

This program is run when you log into a lab/Vlab computer or into a terminal over SSH: /usr/bin/tidy-homedir-appfiles

It will only find files that are generally known to be fine to delete. It also finds duplicate files created by applications and merges them into a single copy.

You can run it yourself again to further clean up unneeded files.

Look for the largest files and directories

You should look at the largest files and directories and check whether you can delete them. Several programs installed on CSE computers can find the largest files for you.

Disk Usage Analyzer App.

One of the easiest ways to check where your space has gone is to run the baobab command on a Lab or Vlab Desktop Session.

Click 'Home Folder' to see a graphical breakdown of the space usage in your home directory.

Right-clicking an entry in the file browser pane will allow you to move it to the trash.

Console Programs

baobab isn't available from the login servers, so you should use the text console tool ncdu.

This shows you the files and directories that use the most space and allows you to delete them.

A more basic way to list large files and directories is with the du command. $ cd $ du -h -d1 . | sort -rh 1.9G . 279M ./.local 216M ./Personal 193M ./.config 188M ./Projects 175M ./public_html 161M ./Desktop 140M ./.eclipse 68M ./.npm 64M ./lib ... ...

This will give you a list of the directories within your home directory, with the largest listed first.

(Note that the first entry is your entire home directory; you don't want to delete that one...)

You can get a breakdown of each subdirectory in turn by replacing the . with the directory name in question.

For instance, du -h -d1 public_html | sort -rh

Things you can safely delete

Here are some common space-hogs that most people can get rid of…

Files named core

If you're not using gdb, you don't need to keep these - they're memory dumps from crashed programs.

To prevent core files from being produced at all, add this line to your .profile. ulimit -c 0

VS Code folders

Folders called .vscode and .vscode-server in the top level of your home directory can be deleted. They will be created fresh the next time you run the VS Code application.

Old class files

You probably do not need to keep files from classes in previous terms. You can copy those files to your personal computer, then delete the files in your CSE account.


The directory Downloads/ probably contains many files you do not need any more.

Python Libraries

These are generally in the directory .local/lib/python3.7/site-packages which you might delete. When you run "pip3 install ..." that is where the libraries are installed. If you need to get a python library back after deleting it run "pip3 install ..." again.

How do I compress files?

The Linux Way to do this is via the command line: tar -czvf CompressedFolder.tar.gz FolderToCompress

(Note that this leaves the original folder in-place - you can delete it afterwards)

For a graphical utility, try Accessories → Archive Manager (or file-roller from the command line.)

The /unsw/ filesystem

If you have study-related files that you want to keep, but aren't really using, you can store them in the UNSW File system.

This is space made available by UNSW central IT, and does not count towards your CSE disk quota.

It's not quite as fast as your home directory, and can't be shared to other users - but if you're just archiving old files, this doesn't matter.

Getting more quota

If you have cleaned up and moved everything you can, and you still don't have enough disk quota for your work, we may be able to grant you some extra space.

Contact your supervisor or lecturer, explain how much extra space you need and why, and ask them to request it on your behalf.

For more detail, see Extra Disk Space.

Last edited by robertd 16/08/2021

Tags for this page:

disk, quota, space