Dev environment running out of disk space

My Discourse dev environment (ubuntu VM) is running out of disk space, despite doubling the VM’s disk size to 24GB last week. Do I need to manually delete old versions of Discourse or run a cleanup script or something? I can’t think of why else I’d be running out of disk space again since my instance of Discourse only has two users and a couple dozen posts.

1 Like

Probably log files,

rm -fr tmp/*

You can run ncdu to find where all the space is (apt-get install ncdu)

3 Likes

Looks like the tmp folder under discourse doesn’t have that much.

  123.3 MiB [##########] /cache                                                                                         
   25.8 MiB [##        ] /stylesheet-cache
    2.5 MiB [          ] /ember-rails
  948.0 KiB [          ] /spec
   88.0 KiB [          ] /avatar_proxy
   12.0 KiB [          ] /javascript-cache
    8.0 KiB [          ] /download_cache
    8.0 KiB [          ] /pids
e   4.0 KiB [          ] /letter_avatars
e   4.0 KiB [          ] /backup_assets
    4.0 KiB [          ]  rspec_result
    4.0 KiB [          ]  plugin-hash

The entire discourse folder apparently only has 1.2GB. Is anything for Discourse stored elsewhere that I can check directly so I don’t have to wait scanning the whole drive?

1 Like

Try cleaning up your Docker images and containers, if you’re using it:

https://github.com/discourse/discourse_docker/blob/456dcfe/launcher#L473-L474

6 Likes

Perfect, that’s what I needed!

1 Like

Is there any particular reason you’re not saying

./launcher cleanup

here? That seems like a much clearer, simpler piece of advice to give people?

4 Likes

In general this is totally right, but we don’t really have this helper on our dev docker path. We should certainly have a ‘d/cleanup’ for our dev docker setup, @riking maybe add that?

9 Likes

Sure, started https://github.com/discourse/discourse/pull/9082

Lint appears to have flaked?

9 Likes

Sorry I missed that this was a dev question!

6 Likes