AstonJ
(AstonJ)
February 15, 2020, 8:46pm
1
I’m having a tidy up and just reclaimed 28GB by doing this.
Ensure all forums are running (so NOT stopped) then:
docker system prune
And confirm with Y
.
Does anybody else do it? Is it (and/or anything else) routinely recommended by the Discourse team in order to maintain our Discourse instances?
2 Likes
maiki
(maiki)
February 15, 2020, 9:01pm
2
I let the Docker updater purge old containers when it runs low on space, but that only happens when I’m updating Docker, so its rare. Sounds like you have multiple Discourse instances going, I can’t speak to that.
4 Likes
./launcher cleanup
is more recommended, and covered in many many topics here on meta…
8 Likes
AstonJ
(AstonJ)
February 15, 2020, 9:43pm
4
Thanks, does it remove just containers?
cleanup: Remove all containers that have stopped for > 24 hours
docker system prune
does:
- all stopped containers
- all networks not used by at least one container
- all dangling images
- all build cache
If so would it be worth doing cleanup first then the docker prune?
A lot of the HD space reclaimed was via removed images:
Deleted Containers:
8989d5eafed3c6348a9f0c944f55c6069fc634aeb15ef41098b6ffdadfff4467
Deleted Images:
deleted: sha256:a5a5c3c6e38872025b56cb657906c28e2253c3796b4032be55eb28a43c4e545c
deleted: sha256:4c50e9c146bfb39eaf8435f1c282f45879d3275126c4ec393869582a7a4d5cbd
deleted: sha256:09a70a26ad88bf2ce5abcbb2746ae5e2c92d05b734a4ecb2b14faa0c0822374c
deleted: sha256:c784353edce30b2930717c3b02497b6387b627a0d21d6295d3d0c70cd95fc87c
deleted: sha256:e046ecf201fbcdd319005953880025a0e91320cb49d7f9b27ec244eb2bc80e19
deleted: sha256:f5fe176a036526be3a4e6b0a9339e7e9a2a00d66796b01f22dcae51e7f8968e4
deleted: sha256:8a0241d85b9106c4df58448cf0fe1d282c8b83a28aa5d8f44188c7050b6760e7
deleted: sha256:892b76a0860ace9982169090a107447f5dcdd17d78d5daabb2d47b85b89b894f
deleted: sha256:33aeb5bdfc03f9171d2d29b4636929c2b4bba5f983639d68c4d2cf700d80c370
deleted: sha256:c2d3cdd4b859ef1c45f850b25b5df3c9a24c5f38b6fe211a8dee39e70c0fc807
deleted: sha256:993a4531e14bc989b05f45e0d25d6a03b8d51c11e31e8057bb054cbd0c878873
deleted: sha256:af01b02adbd9a4f87c388eedff25ed325bacc66d494469b5e4f37c1f1c41af49
deleted: sha256:f5c8b9ab9e04cb598d339557664e2e2ae17233dd0078a4ce72c6a23e2d1f69db
deleted: sha256:2a6813a63106106bb579df20088918cce7006223995a87399666bcefe50196ac
deleted: sha256:e2d2d268acdb7a145e421e777dacb51f102ef538c69c1ce1747aca5cab7c63f1
deleted: sha256:32436d128c04ba1fd47580903ae73fe2bddfedaeadf2a5a047d8c27b877a94cf
deleted: sha256:9d8cc9ebf24cebfc365de08e404eec5616e8f1257de02380440cb1008aabeba8
deleted: sha256:b51231c2325f9d3e1cf41bf83d2f34fb1ec74766545fd8f4b47f1d460515ddce
deleted: sha256:4b740e3f816620ba25f09c26e34af4f846c10590f2a16bf6b1849f0cefee941a
deleted: sha256:aed946e70f9992d4a1fe9a58466d89ff8ff4c4fde06604c58d2e45a6a3b6e117
deleted: sha256:8fbddbd56880590ca087acb3c42705c6943aba4208a3e9d425675f8adf9edd5b
deleted: sha256:264b2ce39590e7ad870036618eb5112060c4bf7cb31c263ce46a1afdeaf91efc
deleted: sha256:61b234732828f310e020fc66b00e924ce9fb6fba4e608a4924ecd704f8c14e23
deleted: sha256:5485ea5656a8656570635e3ee98498a26c3ea21d248500173545d45f74f065d5
deleted: sha256:543a5a42f0ba6d4b4df07f5450a5471049e6a6d89f44be18289dcf2dbece063f
deleted: sha256:d8f6e8c526e4e4714394a0f5a36f9a9a08d0b848783072f6c0d7a753e45093bd
deleted: sha256:7dad94c5f48fdde5274185375df590c973b448e04535acdffa393d35fa99691b
deleted: sha256:1df5bd192eaf7ae1cc110e1eb93af42cdc2e8ea4799a88a4dbe0c85a118af2d1
deleted: sha256:8dc32a5348882ece3ee648b40ed33b6d86ffb87d3570d1e4847d3398aed4e5a7
deleted: sha256:1d450751d4dc71941251346cc109e28b8de7af0706d8c6a6cc1f6a6a7561670f
deleted: sha256:59d8d124a061dc2b5ef711ec35aa41697d3e6ff7b510c43d8f383656866b4ddd
deleted: sha256:b3c415106e20b05afd10e1842b6baf0aa853f5f8dbe00034d11ba8afb47ae50f
deleted: sha256:43d274dc62cd0bb15393fdc847eeb824bec4e3f23b5e4338bd2fb42dcd551c29
deleted: sha256:d6b5a749012392db26ec65d9bb114ce5f7daab14cec02d0a513f58535bd1873f
deleted: sha256:84cf770fecfc683073de6437fbbea5b656f835083fcfa13c0b4bd0f406fd4848
deleted: sha256:4336aecfb02a3509a61a23971c12b4df22bf97f88493c17be96adc1a494914ea
deleted: sha256:8ae6fb2a00993f50bfe70fe4523dcfac54638a344d4b201ae1d9410829861060
deleted: sha256:6ea56353a356ae23158a7bbd7525af2ccede99d77edc0c390e9064e3e8043d22
deleted: sha256:8e9885ceddee58bb56c4b5ed54991fc8f4af5cd225372188f24c444f496e4b1b
deleted: sha256:358a1ff8a0deba7dba1ae254aab1ac6c1d629308b04db3596161c9506d7ae28c
deleted: sha256:8223e6f5f4df658c1889fd2b96268d80b96116e2ea151f495a00357ccafef5ce
deleted: sha256:a9d3fbcffed4af390b802c5087a542db036fa4c55d8edd258afec4751a0cbb4f
deleted: sha256:9a5a07a536877f3ffbbd2864b85ce30e0a39ca0de6f7f3b528f36e332c0562f3
deleted: sha256:c70c135f4c1f70f3efd80e3d1b60e76db13504aa5227ba2756597bcba7df7d2b
deleted: sha256:7a732b1e29fb31641abe58dd13abf7614adc694a194b165aea170093aca5711c
deleted: sha256:6e1cafdba91a1b8d95e3629b25a0bd0dffa67c28b61f676fadd43e095fdfdffb
deleted: sha256:9a32a867f02f566d3a9a7792d27d0d4b38f36da6127661793a7420fdb8111b57
deleted: sha256:b792eec6f835385852002774cdc69fd7e7e5080789f4bb38b7bac9250d3467ef
deleted: sha256:5d92484a4e72c3204804bf931606ec08cb808f3cfbbe04d39f66a55d89184a51
deleted: sha256:4202bf632c9f5e34bdae93f72dc2cab9e9dc4a60d47fed2aad48bee4163d078c
deleted: sha256:de4a489c127e3ea5486f1e78fb8004111d2a1f2f1d20583f87c717a266443199
deleted: sha256:bc7c6dec558e475a4c1817b53eae39c1520223d498e81026e816ca0bb3de8ccd
deleted: sha256:43914cdc904ef24c9ca466d9f28f565e78dcb4ce55c7aa6598570451bac8d608
deleted: sha256:fa0c0462b3d10334db9375d4d71a9cecd6521dab9357f06d726e4f9e74455545
deleted: sha256:9734ff38fca33f670e347f8e91613c2ee65b974cf13b9e845f895792fe564d8f
deleted: sha256:ec2ad3596b0d2e6c6067597d6f7a51168d83faa9a434190049915c637b580edb
deleted: sha256:6d7f85dbdc642117e74756a69c50f534f5d3d56ca7d1922d957f02776285be00
deleted: sha256:4411f5246b9974d4d9922f7ab7c0f893630bdd2daff4a8bb978f30c33089612c
deleted: sha256:e54a2ce80a982979047070745efbcb0ddc1fedd910cf9d5bcc5cdac87c22269c
deleted: sha256:b30dceb88c6f3e1e997e6a2d54287f6d2aadc6b6f69053654f022af655d61503
deleted: sha256:83c2db00ed64d8a0013229a6a3253c28c82fc55515f714cf8abd47fbf6fa3079
deleted: sha256:9f61760608e5871b9ccc4753936d49704b32bdbb166249c53ba12cb40e6dba54
deleted: sha256:75908a4f2a07107942cc9d1e0fd5049b10caeb74915493a427bcb7603924ea30
deleted: sha256:4daf3b55a498836224173b099e94e634698f9f2a2d8664a0d6ae1f46cff8a806
deleted: sha256:b5bccaec4a7d3a2a2bae963bf7ca73229f255afda311afcc1a18955fed1bafbb
deleted: sha256:bbf47e9bd7cbd9262152f509dc865dff64ae07658ceeb547b33d3e5ad2ac6b0e
deleted: sha256:18346fc5f0babc43dd85b2b4123202bac17ab6aa62aa13ea4c2d0880082ef721
deleted: sha256:f8d4150f3122906cbd6da4380ea85ba912b94ad22bf10170b7cb4fa85090e5bf
deleted: sha256:62d7083b737bb058ba4e48da035d474f024ed0d4851afdcf5668a302700e5849
deleted: sha256:7ab291543599e5bf0dcc1532411a95117c846a6606d3f2543e41a4e2ba534c91
deleted: sha256:ac5b55398c0bb0f611b5f5ed15f1a5152238108ca539e269da79b8e669799093
deleted: sha256:9c48a5772380c2e0da9132d7eaf184fade8bec66859921032525c61a4b715cd5
deleted: sha256:aebf1d1bd3271bdfbb7fd9ef9b0e7a9d28c9c37f0aad90882867fe250f509c41
deleted: sha256:42bf307fd5f822b9e90c939f7e54d29519816ba6075aaa3e9365cf0c03bfb327
deleted: sha256:4ea2e253a00efb225be52274a0d64373831ee019014998f6ee8affb23d362472
deleted: sha256:642bf4351207802a105f3f460785cb88a98c8d7b1ea63bce203f88b4836a2656
deleted: sha256:807a5c184cd52c571052ff7254697f10651c86331851904656b8bb22e9d0b5aa
deleted: sha256:060281a3ef0f3eae23d7c93d65f74b7c67178c457309c6e41d4f198aae89031a
deleted: sha256:c126c115c6b524fb4e05013c39b89172ccdcd5e5cf1efbae0b3a1af3fac8bb5f
deleted: sha256:f1c3e07b7346214fd313dbb7cd05277ca90e7836a7b3b639f0885f5514735fc5
deleted: sha256:23d9fb7e02461425e45bcbc8ca6efb7a10f60a2d22b46d9a5f1bbaf4b0d98952
deleted: sha256:e1dbdcea03b6a348253639ec7c720cc941f9783bd3dd419665ccf5df0f246c8e
deleted: sha256:1d42ff38a287a5be77539d594d325813196778d38a9bc69418541933ccd03d43
deleted: sha256:58e7cdafa17c2b6f6118c522c63ab91000303a2f6fc1aacab8832482201ecec8
deleted: sha256:988b862f248e76d808dd231dcbf88e882115e6f6d9e926bb4019a3793ba41b36
deleted: sha256:1e82a644e8b6dde337b4db675308fe67e2ae0028e6e964be8746e1cf9e87345c
deleted: sha256:594a3c1c7826d88601d73d8d45e363c4e4bc67664cb0795c43bd05f1f32aaf02
deleted: sha256:63ce6aacdb3d3349bdaefb93468e8995cc7cee2ba1e2c123cc8d4176a99376f6
deleted: sha256:d694f6c84de0c505b887f1de08c9ac831bda12e7cb89f261cb22889699326dc5
deleted: sha256:97db07efdc69145f2cf194ffb277b33482284001998ec0d44c8ec61e3236ef73
deleted: sha256:6d6c9fcd26928129bdd137666aa0236e1487ec8046d2efba508b5aca5a0894be
deleted: sha256:548208dfb25958594ab9ed110f34a2c525e4efbd4ac86138bb11169e281999e3
deleted: sha256:701fb57b68890bee539e4e0c2f7df3e7db6304c9695d34f8771f8c128232fdd4
deleted: sha256:25ecb27836b7dde7bbf5abad8454fa06ee09ed6b8cd0f252c876f5f6ffe77216
deleted: sha256:9e33f99cfa379bd3c8e010b82590d4b55bfac602c69ecd21187126220fdf80eb
deleted: sha256:39d67dcaeb3dc40dc021cd60464b85cd1cad22f688cf1105439932f2d23c2786
deleted: sha256:17e8b0620c4cfbf7787819fc85af45ae95b13e67a87dd4b92103492decf43663
deleted: sha256:abbe4fb97b005d1d723f037d20d9daf77eaf29fa77b356c5156a6a81ee326b6f
deleted: sha256:b0c209ac3868cffee5e306982cc911ead53a4c07911476699db63834a60e5f43
deleted: sha256:47d1cc4409d8cd0365426ad6927b0f427dc23381057fef5b51004788373a4d48
deleted: sha256:11b58f36f2bf94c3e5e915053d537de8720a936c6650a82648aba0ba2ff592a9
deleted: sha256:dedfabd8ef9129a79eeb2259bdcb4d7e46a72a49196297cccedcff580da52e35
Total reclaimed space: 28.04GB
Edit : it removed unused images as well
# ./launcher cleanup
WARNING! This will remove all stopped containers.
Are you sure you want to continue? [y/N] y
Total reclaimed space: 0B
WARNING! This will remove all images without at least one container associated to them.
Are you sure you want to continue? [y/N] y
Deleted Images:
untagged: discourse/base:2.0.20190625-0946
untagged: discourse/base@sha256:9899c60721649460283ac800836ac1ebecbc3ed8a97a496e514cf8c97f5b6d82
deleted: sha256:2b3a5b47565f3f548721769fbf6d6eb70555bea9929078c59a4e1693aa4f08f6
deleted: sha256:7bc1123c09e444ca6b2408d70bd6bdf10ad4f877d4bc2dc34685f380559bce1b
deleted: sha256:03952d61b1fc131f23629c02f7ffb93708ae77108a32e4eedd83d4ec987ba51c
deleted: sha256:a48e1b8909b41276ed1666d5262d981258163c6f0998b58e61efa4188944652e
deleted: sha256:872ef8aee8632246e43a346a70274030c3613fe81af162a2fb6d14e1fcba980d
deleted: sha256:1ea5a27b0484f2a227275fbb913d281461d9f356134a56002574904c3cfdea04
untagged: discourse/base:2.0.20191013-2320
untagged: discourse/base@sha256:77e010342aa5111c8c3b81d80de7d4bdb229793d595bbe373992cdb8f86ef41f
untagged: discourse/base:2.0.20190217
untagged: discourse/base@sha256:b4a99727963bf5d55b9813e93293d658822d1e461bbfd5811bbb162e8b61dddb
deleted: sha256:9c24db193c37b3d8cc371768a464f6f7d2a92640457a4d4bd5d4b72024253504
deleted: sha256:0c32a1b63c7a233e3b3c634a6015b3d87288e1e8edfc7db6d82b249ded484fcf
deleted: sha256:7eb46ebc736921ffa70c8757618b02e4d0d3c4627d823a7e1b8f59bb924ecf93
deleted: sha256:4f9c6186221ca469b29e4b55599f2a7969b705df4ef10d1585f2e7681503eb7b
deleted: sha256:fc94d17b18c9a353a5b5b9500e04a4c24d8d4b2632fd549596c85e6157377fc2
deleted: sha256:0de2edf7bff41238438e25b6f2de055b97c7fb6fe095cd560c2095b8dd70fc99
untagged: local_discourse/app:latest
deleted: sha256:bb2ef80c28c3bc515f56a91ae7a69a1798a999b77e40f7f768a1ac134f874664
deleted: sha256:403b655ac940b4a031eadac773670b048d2990045dee99eebd137440273d1089
untagged: discourse/base:2.0.20181010
untagged: discourse/base@sha256:98eb4ece77b665cd0f29f64d8d0281e365efdedfc8946e6f85c4cf80187e3734
deleted: sha256:d6ab119b2bf1eee96c8390b810a9a40d51bd00cff8c2d86a7c1d5176e09ae5c5
deleted: sha256:36005dec756bc240578c284b50aa3470ca59d7a182deca0f9b87ce2180d0b7fe
deleted: sha256:479fa3c649ef40ba88c3ff090b963dca3189ad1b77d9d734f8cd4d9079ea3990
deleted: sha256:bd78a203e965358e5e95b20c5fa4b3e3599d1cbc58d00522324e233e7cbf8554
deleted: sha256:f5aad241af819c313bd6f5fbfeaae096f0fc977c0806fc9b1464d2260adacd22
deleted: sha256:7c82a79e7c32df5cd4d9f9ec8da86396c06e6dcfa99d5e991c2e98b8e804e8d0
deleted: sha256:8823818c474862932702f8a920abea43b2560ddceb910d145be9ba0eb149a643
untagged: discourse/base:2.0.20181031
untagged: discourse/base@sha256:62a20b58604f68844ab816ea75f7d33b872b3dd53367224a14444c64e8eb57c4
deleted: sha256:ea31cd77735ab3d86f3d8903425d4157320b7047a07da4555a4752614c6e5265
deleted: sha256:b375a11cf89e3f124f9151688c2952ef8ca45f5ab5f2bd0751ea3f617708df87
deleted: sha256:cce92fda689ab9033f0b8db214bc63edd1ae3e05831a0f3a9418976d7dc7ccdd
deleted: sha256:d22094bbd65447c59a42c580eaa3a44cee9cd855f00905f59409be21bcefc745
deleted: sha256:b8976847450013f3eb5e9a81a5778f73ed7bef67e6393049712ef17102b4b7b7
deleted: sha256:b8c891f0ffec910a12757d733b178e3f62d81dbbde2b31d3b754071c416108ed
untagged: discourse/base:2.0.20190906-0522
untagged: discourse/base@sha256:8c58bd323c80b464b2634d2aa8c322772d0c7bff3e08eff06cf2b66d37fe623d
deleted: sha256:6da16759d83d90d5dbfa0e2c93e0044c5105558f37adac05a39f731e46ecd6b4
deleted: sha256:2afacc0296ca8dce84fba364a87969aecd72946d8eb308d6ebeea6172030ba14
deleted: sha256:1c95c77433e8d7bf0f519c9d8c9ca967e2603f0defbf379130d9a841cca2e28e
untagged: discourse/base:2.0.20191219-2109
untagged: discourse/base@sha256:d6dff261a474d5556b134e38ccfb2afecc1478827d3841b70e4804004eca2a03
untagged: local_discourse/app3:latest
deleted: sha256:e7161cee609340c94277f468c22f004cd6217785951dbb92e5ac468c863b4170
deleted: sha256:5897735ecb7baca33ae299322c6f4a18be59f77aac5297c31aacaf0255da3635
untagged: discourse/base:2.0.20180802
untagged: discourse/base@sha256:be738714169c78e371f93bfa1079f750475b0910567d4f86fa50d6e66910b656
deleted: sha256:d6f8b60292273d0b7e20dfc6f79e412a9d4a0454c6410809f87a6530327eded1
deleted: sha256:bf348a05ba553ae4a139cf266e6212d9a7efea537e5045709620e1bacdcf2cd7
deleted: sha256:f76ad2747c0572f55b020c680fb3ecf2c9888bc124773c2e99a8aef5a2b57ee9
deleted: sha256:e843589b7eab2c99f01c7c36603e79cd582ec77e923801fc5477e676ca99f937
deleted: sha256:32fe28af8b933473d4fc8e0fdff4f53a3dd878e777d2d0f4e069eafec89dec24
deleted: sha256:c78abc0d85ace0d885a620a4fd6af7f3d4700efe13499996128e15e970703762
deleted: sha256:0a42ee6ceccb1b90de2a3badec7c74cc452ce61e7ef20a80bb7f20ea53f2825e
untagged: local_discourse/metaruby:latest
deleted: sha256:401d948058ff306397680b2ce490f60e2d0d8101e60d48d39043d2184d0a249d
deleted: sha256:93a5f531499f7e92d7087909e0fc5769605f2037be95a38a42aa96837548addd
deleted: sha256:4a99baef7044cc8d119f1b31243782eb3ba3c7f702d16007a835f34d86cda33d
deleted: sha256:4caf405015c8065a6f3f22d553e34fba5cd2a2d0bd91da4335f1df9c29940417
deleted: sha256:831c5620387fb9efec59fc82a42b948546c6be601e3ab34a87108ecf852aa15f
Total reclaimed space: 15.81GB
So I saved a further 15GB
3 Likes
sam
(Sam Saffron)
February 18, 2020, 5:06am
5
6 Likes
rudygodoy
(Rudy Godoy)
January 22, 2021, 3:26pm
6
Is there a way to have the cleanup process triggered after upgrades from the admin interface?
Falco
(Falco)
January 22, 2021, 7:50pm
7
The prune runs at the host level, while admin upgrades are internal to the running container.
Also the /.launcher cleanup
cleans up old images, but when using the internal admin upgrade you don’t even download new images.
3 Likes
rudygodoy
(Rudy Godoy)
January 22, 2021, 9:09pm
8
Right. Perhaps the process has changed lately, but I recall having to cleanup many old images manually because they were consuming disk space. Now I have only a couple old images after upgrading to the latest version.
saved me. Thanks, ./launcher cleanup
works great.
1 Like