Disk quota in AFS
Most users' files at KTH are stored on network file systems. Typically, the disk space available is limited by quotas. There are many tools available to see what your quota is, and to find files that are taking up space.
Most Unix and Unix-like operating systems (Solaris, macOS, Ubuntu & RedHat Linux, …) use AFS, and home directories are typically stored there.
Student's home directories are typically limited to 3GB, but you can receive more disk space if needed, as long as it is related to your studies.
To see how much space you are using, open a terminal window and use
What is using the space?
If your quota is near the limit, you can use Ubuntu's Disk Usage Analyzer (under Applications → Accessories) to see what is taking up space. Once it start, press "Scan Home" to analyze your home directory.
Note that configuration files are often hidden, or in hidden directories—that is, the file name has a leading period/full stop. To show hidden files, use Ctrl-H in the file manager, or ls -a in a terminal.
Can't log in?
If the grapical environment (Gnome) does not start, you can use a console login to clear some space. See the FAQ for more information on console login.
You can then use command-line tools to check disk usage. These tools can also be used when logged in to a shell server with SSH . See the example below for more information
If you want to see which files that occupy space you can open
the apple > About This Mac > the tab "Storage" > the button "Manage..."
In the left column you will see different categories and remove files if needed.
.OldFiles does not count
Note that the directory .OldFiles does not count as part of your quota. It actually links to a backup directory, a copy of your home directory from yesterday, which is a separate AFS volume. (You can't modify the files there, and it will be updated again when the daily backup is made, sometime during the night.)
Need more space?
Full quotas are automatically increased for active accounts, but the increase is only a few percent so logging in won't be blocked. But if the space is filled by e.g. browser cache, you will likely fill up the quota again next time you log in. Also, the quota scans only run once every night.
If course work requires a lot of space, check with your course leader. Sometimes, large files can be stored in course directories so students don't need copies in their home directory. If each student must store large files, or if an application requires a lot of space, the course leader can request additional space for all who are registered on the course.
Employees can get larger quotas, although their accounts are usually created with the default quota. However, if a particular project (or some other purpose) requires a lot of disk space, we may also suggest creating a separate AFS volume. This is more effective for the backend servers, and their backups, but can also make it easier to share data with others working on the same project.
Employees with a personal workstation can also store temporary files on local disk. These files are NOT BACKED UP, so this should be used with caution. Contact IT Support for more information.
Command-line tools (example)
You can use du (see man page du(1) ) with some options to show MiB, then sort by size. But note that it is not AFS aware—it won't recognize AFS mountpoints (like OldFiles) as separate filesystems. To check all directories (trailing /):
$ du -sm */ .[a-z]*/ | sort -n | tail 147 .mozilla/ 197 .vscode/ 532 .OLD_gnome_20190201T165603/ 903 .matlab/ 987 .local/ 1408 .config/ 1712 .ros/ 1826 Library_kth_20190617 2276 .cache/ 4418 OldFiles/
OldFiles can be ignored, see above.
The .OLD_gnome_xxx directory has been created by gnome-cleanup ( see FAQ ). But as it is more than a year old, it can probably be deleted.
The Library_kth_2019… directory was used for settings in an older version of macOS. Old Library directories were renamed as the macOS used in computer classrooms after 2019 was no longer compatible, and migrating the settings on login would have taken a very long time. If you no longer need the old settings, the directory can be removed.
To see what's in other large directories:
$ du -sm .config/* .matlab/* .ros/* .cache/* | sort -n | tail -12 11 .cache/thunderbird 183 .matlab/R2020a 231 .matlab/R2018a 248 .matlab/R2015b 252 .matlab/R2017a 268 .cache/google-chrome 520 .config/google-chrome 706 .cache/pip 783 .config/Code 967 .local/lib 1130 .cache/mozilla 1711 .ros/log
The old Matlab directories can be removed. As of 2020–2021 only R2020A is available in the standard environment.
The Python pip cache can be cleared, and if you are no longer using personal python packages (sub directories to ~/.local/lib), you may be able to remove them as well.
The browser cache for Firefox (~/.cache/mozilla) and Google Chrome can be cleared. However, if you delete the files the browser may still try to use the cached data, showing broken web pages. It is better to clear from within the browser:
- Firefox: Edit » Preferences » Privacy & Security » Cookies and Site Data » Clear Data...
- Google Chrome: Ctrl+Shift+Del will open Clear browsing data. Be very careful to make sure only Cached images and files are marked, using Time rage: All time. Click Clear data. You do not want to delete your history and saved passwords!
The other directories, such as logs from ROS Melodic, or Visual Studio Code's ~/.vscode and ~/.config/Code, may or may not be needed—you will need to decide for yourself.