I added over 17000 users to my client’s Discourse installation via the API. I have to delete them now because reasons.
I’ve worked out how to delete the users themselves via the Rails app as explained here: Bulk delete suspended users after import
This doesn’t seem to delete the user avatar pictures (unless Discourse is caching them?) so I was wondering if anyone can tell me where I can go in the DigitalOcean droplet to delete the images?
Thanks!
pfaffman
(Jay Pfaffman)
December 20, 2017, 5:26pm
2
They’ll get deleted eventually. A process runs and moves unlinked images to a “tombstone” directory and then they get deleted 30 days later.
5 Likes
Oh cool. 30 days might be a bit long but that’s good to know.
Thanks AGAIN Jay!
(Just for my own curiosity, what’d happen if one were to manually delete images from the Tombstone folder?)
1 Like
pfaffman
(Jay Pfaffman)
December 20, 2017, 5:30pm
4
It would be deleted and you couldn’t decide later that you want it back. Avatars ain’t that big, so it wouldn’t seem like a huge problem.
I think it is not 30 days. We have site setting for that as clean_orphan_uploads_grace_period_hours
(default 48).
pfaffman
(Jay Pfaffman)
December 20, 2017, 5:38pm
6
I’m pretty sure that clean_orphan_uploads_grace_period_hours
is how long before stuff gets moved to the tombstone folder (e.g., What happens if I manually move images out of the tombstone directory? )
It becomes a bigger problem when you realize that 17000+ avatars takes up around 2.5 gigabytes of space…
pfaffman
(Jay Pfaffman)
December 20, 2017, 5:41pm
8
I see. You might do a ./launcher cleanup
to get back some space from Docker.
1 Like
You are right @pfaffman . Clean up job removes it from database only.
3 Likes