Cleanup command very long

Hi
To do maintenance on my Discourse instances, I tried to use

./launcher cleanup app

command, but it seems to be blocked : I launched the command minutes ago, and nothing happens (and no space is freed on the disk).

(I reproduce the problem on multiple up-to-date instances)

Can the command be very long to execute ?

1 Like

Yes, I can confirm this. Whatever

./launcher cleanup

is trying to do, it’s just hanging now @saj

root@endoffice-a:/var/discourse# ./launcher cleanup app
^C

It looks like we replaced the old spotify/docker-gc with the built in Docker command

$docker_path system prune -a

That seems to work fine for me though, when entered manually:

root@endoffice-a:/var/discourse# docker system prune -a
WARNING! This will remove:
  - all stopped containers
  - all networks not used by at least one container
  - all images without at least one container associated to them
  - all build cache

Are you sure you want to continue? [y/N] y
Deleted Images:
untagged: discourse/base:2.0.20190906-0522
untagged: discourse/base@sha256:8c58bd323c80b464b2634d2aa8c322772d0c7bff3e08eff06cf2b66d37fe623d
deleted: sha256:c60891bfa973940cdc0f2089feae7fa7592c79ea70a752f77f0ece0c8a624806
deleted: sha256:8e3dfaf1cbbdcd69f84cc6384ebd8b32dd41c6d553c5250d865d589cf4e2e559
deleted: sha256:8bd0616c23093aae3b2fd0e9b571390c483c785571007cf42cecb94e96e248c3
deleted: sha256:0331820444cafba1e1637eaf7d739a5c439984322267a4771c1dd1011dc92c3a
deleted: sha256:10f636afbeaf84c0b8794138bfe0d5219b947b3559f8a00a0434ebacd81c2389
deleted: sha256:23d467eef0f254147d8a07f1a1e398c2b5e4a05b43ae1ffd2bb66cdadd8e24d4

Total reclaimed space: 2.874GB
root@endoffice-a:/var/discourse#

Hopefully it’s some minor thing regarding BASH code, I dunno.

2 Likes

Hi @samyrabih,

Sorry about that! This has been fixed. Please git pull the latest launcher and try again.

8 Likes

Confirmed! Fix works for me, thanks @saj :beers:

4 Likes