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
You can select files to delete in the Desktop File Browser.
You may see the option to move files to Trash. Note that your Trash folder is part of your home directory and thus moving the files to Trash means they still use quota space. You need to also Empty the Trash to removed the files.
You can directly remove files using console commands:
rm -rI directory or:
rm -I filename
Files deleted and not sent to Trash 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
First view the Trash folder in the file browser, or run the command trash-list. If there are no files in your Trash folder then you cannot free up space there.
Sending files to Trash rather than deleting them outright will leave them in your account Trash folder where they will still use your quota.
The Trash folder is in your home directory here: .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:
Usually you can delete all trash with this command: trash-empty
Command-line programs for Trash
- List Trash contents
- Delete Trash older than 7 days
- trash-empty 7
- Delete all Trash
Look for the largest files and directories
You should look at the largest files and directories and check whether you can delete them.
Note that the file browser will usually not show you directories with names starting with '.' This is unfortunate because such directories (eg: .cache/) often take up the most space.
Several programs installed on CSE computers can find the largest files for you, and will look in directories starting with .
Those are the programs baobab and ncdu as well as the basic utility du
Disk Usage Analyzer App. (baobab)
One of the easiest ways to check where your space has gone is to run the Disk Usage Analyzer application, called baobab.Otherwise, run the ncdu program.
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.
On a text console you can use the ncdu program. This shows you the files and directories that use the most space and allows you to delete them.
It is interactive and has simple controls. (Press ? for help.)
A more basic way to list large files and directories is with the du command.
$ du -h -d1 . | sort -rh
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.
du -h -d1 public_html | sort -rh
Another way would be to list the 30 biggest directories or files by total size:
du -a ~ | sort -n | tail -n30
Things you can safely delete
Here are some common space-hogs that most people can get rid of…
.cache .config/Code/Cache .config/Code/CachedExtensionVSIXs .gradle/caches .npm/_cacache
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.
DownloadsThe directory Downloads/ probably contains many files you do not need any more.
These are generally in the directory .local/lib/python3.9/site-packages which you might delete. Those were installed when you ran "pip3 install ...". If you need to get a python library back after deleting it run "pip3 install ..." again.
Python3.7 is no longer used for teaching at CSE, so delete: .local/lib/python3.7
Old NodeJS libraries: node_modules
Every time you run npm install it will regard the current directory as a NodeJS project directory, and create a subdirectory called node_modules. That stores the libraries your NodeJS project uses. When you install NPM libraries, they will use space in the store, possibly taking up a large part of your account space.
If you create many such NodeJS project directories, this problem is multiplied.
Find project directories you are no longer working on. Delete the node_modules subdirectory inside.
Old class filesYou 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.
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
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.)
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.