How to maintain control over disk size

I use Cloud9 (railstutorial.org) and noticed that the disk space used by my workspace is growing rapidly towards the disk quota.

Is there a way to clear the workspace and thereby reduce the used disk space?

Currently, the workspace is 817 MB (see quota -s below). I downloaded it to see the size of the directories, and I do not understand this. The directory containing my project is only 170 MB in size, and the .9 folder is only 3 MB. Thus, this does not approach 817 MB ... And the used disk space continues to grow, although I am not making any major changes to the contents of my project.

  Size Used Avail Use% 1.1G 817M 222M 79% 

Perhaps this is due to the .9 folder? For example, I manually deleted several subprojects, but in the .9 folder these projects still exist, including their files. I also wonder if different versions of gems can be installed in the .9 folder ... so if you update a gem, it includes both versions of the gem.

I'm not sure how this folder or Cloud9 repository works at all, but my question is how to clear the disk space (without having to delete anything in my project)? Perhaps there is a cleaning function? I could, of course, create a new workspace and upload my project there, but maybe there is an alternative, preserving the current workspace.

+7
cloud9-ide
source share
3 answers

The du-c9 command lists all files contributing to your quota. You can recover disk space by deleting the files listed with this command.

+7
source share

For a convenient interface, you can install ncdu to see the size of all your folders. First, make room for installation. The usual way to do this is to delete the tmp folder:

 rm -rf /tmp/* 

Then install ncdu :

 sudo apt-get install ncdu 

Then run ncdu and navigate your folders to find out which ones use the most space:

 ncdu ~ 

Link: https://docs.c9.io/discuss/557ecf787eafa719001d1af8

+7
source share

For me, the answers above, unfortunately, did not work (the first created a list for an incomprehensibly long time, so long that I ran out of scroll space in the shell, and the second a strange list - see the end of this answer):

What was done:

1) From this support article faq: du -hx / -t 50,000,000

2) Identify the culprit from an easy to read, easy to understand list: in my case 1.1G / home / ubuntu / .local / share / heroku / tmp

3) From the examples in this article : rm -r / home / ubuntu / .local / share / heroku / tmp

Strange list: 1./.bundle 1./.git 1./README.md 1./Project_5 2./.c9 2./Project_1 3./Project_2 17./Project_3 28./Project_4 50.

0
source share

All Articles