Running out of disk space

Hey! The activity log is telling me that my project is running out of space but I have not changed anything in it recently so I do not understand why all of a sudden it is telling me this! What makes me more confused is that even after deleting some files it keeps telling the same thing (used 126.1 out of 128 MB). How is this possible if I have deleted some files? Is there a way for me to figure out what is taking up that space?

Jump to the console in advance options and follow these recommendations:

  • Check disk space using $ df
  • Run git gc and git prune, this will help cleanup files and remove unreachable objects
  • If you’re not worried about git history, remove the .git folder using $ rm -rf .git
  • Remove unused dependencies from your package.json
  • Review your dependencies in the node_modules folder.

Recheck with $ df, the partition that is limited is the one under /app.

Hope this helps!

7 Likes

Is there a way to see how much space each file takes? Thanks!

You can run this command to list and sort all the files in your project by filesize

$ find . -type f  -exec du -h {} + | sort -r -h
4 Likes

Dude, thank you SO MUCH! Legend!

You can also run ncdu ., which takes a while to load, but gives you an overview of which directories are taking up the most space.

1 Like

Is there a way to re-enable the default git checkpointing after deleting the .git folder?

Oh… it seems if I wait a bit .git magically returns, never mind!

1 Like

Ok so my disk is at 95% and it wont let me save any new changes in my code i would like to try using git gc or git prune but im worried it might mess something up any advice?

Running those commands should not mess up anything, but if your project space is too full, you will have to given some space to be able to run the commands!

1 Like

my glitch project, retrojs-official has been using affully a lot of space quickly , from memory, cpu, and disk, can someone please explain this?

1 Like

If you run enable-pnpm in the console that should fix you Disk Space issue (hopefully). However, for your memory and CPU usage, that issue is either caused by your code or some libraries/modules.

@Romoslayer were you able to address your disk space issue?

no i tried git prune and gc and i still have 95% disk space being used


Virus-free. www.avast.com

Hey @Romoslayer if you provide your project name someone can take a look.

The project name is romobot and if someone could help that would be great thanks.

Hey @Romoslayer, you’re basically out of disk space in that project. When I run du -hd1 in the project’s console I see that most of that space is taken up with your .git folder, so following the steps in Glitch full disk error will likely be helpful.

I’ve granted your project additional space for 24 hours to give you the free space you’ll need to work through those steps. Let us know if you run into other problems.

Great thanks i cleared my disk space and its at 2 thanks for the help

1 Like

Hello, my project have disk space on 95% and i cant get it down
and i aiready run this commands from console
rm -rf .git git prune and git gc
and still stuck on 95%, from this i cant edit my project

it may cause if you use npm to install modules try to uninstall all npm modules and install node modules using pnpm ex - pnpm i express