Reducing your disk usage on the RStudio server

Tags studio r

The RStudio server has a per user quota for files that is sometimes met, particularly when a user has multiple courses over the course of a year. In the case that the quota is met, you will receive an email warning you that you have a week to remove files before your account will be blocked. Because of the way that the RStudio server is set up, users cannot simply delete folders from their personal folder, as the majority of these are symlinks, or aliases, pointing to shared drives used by an entire class. In order to reduce disk usage, it is necessary to remove specific files from within these folders. Additionally, active sessions store temporary data that can add to a user's total.

Clearing out active R sessions

It's always a good idea to occasionally close down active R sessions, particularly if you have been loading large datasets or creating lots of graphs or visualizations that could be taking up large amounts of disk space temporarily. This is especially true if you find that the largest files listed in your warning email are not particularly large. This could indicate that your current/active session(s) contain a a number of large files that are contributing to your quota.

To close down a session, open R in your browser, and click on the drop-down menu arrow next to the word Sessions in the upper-right corner of the window. From the drop-down list, click on the orange power button icon next to each session that is open. Doing this will clear out files associated with/created for this session, and can help bring you below your quota.

Screen capture of R server window with arrow pointing to the drop-down menu next to the word Sessions and arrows pointing at power button icons to close individual sessions

Removing files from the RStudio server

In order to clear individual files from your personal R server space, begin by logging in to the R server,  and navigating to the File browser. This can usually be accessed by clicking on the Files tab in the browser window, often in the lower right of the window. You can also access Files using the top menu View -> Files, or by using the key combination Ctrl + 5.

Screen capture of R server File browser window

In the top-level Home directory, you will see a number of folders, including one for each R course that you were enrolled in. As stated above, each of these course folders is a symlink or alias pointing to a shared folder used by all members of a course. In order to clear your files from this folder, you'll need to enter the course folder by clicking on it to see the standard course subfolders, ClassInclassProject, and Submit. The Class folder contains shared documents for the entire class, and cannot be modified or deleted by course participants. The other folder may contain your personal files. Generally, the Project and Submit folders will contain your largest files. You may also have files located in the top-level of the course folder.

Screen capture of R folder browser listing the typical course subfolders

Clicking on one of the subfolders will display your files located in these shared folders. Once you have identified the files to be removed, you can mark them for deletion by clicking on the checkbox to the left of the file name. You can also check all of the boxes at once by selecting the checkbox to the left of the Home icon. If you wish to remove most of the files, but not all, you can use this button to select all the files and then deselect individual files to keep. Once all files have been marked, remove the files by clicking on the Delete button in the menu above the folder location. You will be presented with a pop-up window asking you to confirm deletion.

Screen capture of R server file browser with files selected for deletion

If you have removed all of your personal files from a course folder and wish to remove the course folder symlink from your Home directory, you can navigate there and check the box next to the course folder and delete it. Note: once you remove the symlink to the course directory, you will lose the ability to access the shared files in that folder.

Print Article

Details

Article ID: 137981
Created
Wed 9/22/21 9:53 AM
Modified
Tue 12/13/22 10:43 AM