# Dev environment running out of disk space

**URL:** <https://meta.discourse.org/t/dev-environment-running-out-of-disk-space/142980>\
**Category:** Development\
**Created:** [February 29, 2020, 10:42pm UTC](https://meta.discourse.org/t/dev-environment-running-out-of-disk-space/142980 "2020-02-29T22:42:14Z")\
**Posts on this page:** 9\
**Page:** 1

## AI-generated summary

The discussion revolves around a Dev environment running out of disk space. [seanblue](/t/-/142980/1) initially reports the issue, despite increasing the VM's disk size to 24GB. [sam](/t/-/142980/2) suggests deleting log files with `rm -fr tmp/*` and using `ncdu` to identify disk space usage. However, [seanblue](/t/-/142980/3) finds that the `tmp` folder is not the main culprit.

[riking](/t/-/142980/4) then suggests cleaning up Docker images and containers, providing a GitHub link for reference. This solves the issue for [seanblue](/t/-/142980/5). [codinghorror](/t/-/142980/6) points out that the simpler command `./launcher cleanup` would have been a more helpful answer.

However, [sam](/t/-/142980/7) explains that this command is not available on the dev Docker path. As a result, [riking](/t/-/142980/9) creates a GitHub pull request (#9082) to add the `d/cleanup` command for the dev Docker setup.

<div class="post-metadata">

**Author:** ![seanblue](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@seanblue](https://meta.discourse.org/u/seanblue)\
**Post date:** [February 29, 2020, 10:42pm UTC](https://meta.discourse.org/t/dev-environment-running-out-of-disk-space/142980/1 "2020-02-29T22:42:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [February 29, 2020, 10:46pm UTC](https://meta.discourse.org/t/dev-environment-running-out-of-disk-space/142980/2 "2020-02-29T22:46:31Z")

</div>

Probably log files,

`rm -fr tmp/*`

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

---

<div class="post-metadata">

**Author:** ![seanblue](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@seanblue](https://meta.discourse.org/u/seanblue)\
**Post date:** [February 29, 2020, 10:58pm UTC](https://meta.discourse.org/t/dev-environment-running-out-of-disk-space/142980/3 "2020-02-29T22:58:23Z")

</div>

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

```plaintext
  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?

---

<div class="post-metadata">

**Author:** ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)\
**Post date:** [February 29, 2020, 11:03pm UTC](https://meta.discourse.org/t/dev-environment-running-out-of-disk-space/142980/4 "2020-02-29T23:03:13Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![seanblue](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@seanblue](https://meta.discourse.org/u/seanblue)\
**Post date:** [February 29, 2020, 11:14pm UTC](https://meta.discourse.org/t/dev-environment-running-out-of-disk-space/142980/5 "2020-02-29T23:14:13Z")

</div>

Perfect, that’s what I needed!

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [February 29, 2020, 11:40pm UTC](https://meta.discourse.org/t/dev-environment-running-out-of-disk-space/142980/6 "2020-02-29T23:40:50Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [March 1, 2020, 12:12am UTC](https://meta.discourse.org/t/dev-environment-running-out-of-disk-space/142980/7 "2020-03-01T00:12:27Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)\
**Post date:** [March 1, 2020, 1:04am UTC](https://meta.discourse.org/t/dev-environment-running-out-of-disk-space/142980/9 "2020-03-01T01:04:01Z")

</div>

Sure, started [DEV: Add docker cleanup script to d/ folder by riking · Pull Request #9082 · discourse/discourse · GitHub](https://github.com/discourse/discourse/pull/9082)

Lint appears to have flaked?

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [March 1, 2020, 8:29am UTC](https://meta.discourse.org/t/dev-environment-running-out-of-disk-space/142980/10 "2020-03-01T08:29:31Z")

</div>

Sorry I missed that this was a dev question!
