Deleting User Images After Removing Users in Rails Console
Frank_Bailey has 17,000+ users to delete and wants to know how to remove their avatar images. pfaffman explains that unlinked images are moved to a “tombstone” directory and deleted after a certain period. Initially, it was thought to be 30 days, but vinothkannans points out that the actual period is set by the clean_orphan_uploads_grace_period_hours site setting (default 48 hours).
pfaffman clarifies that this setting determines how long before images are moved to the tombstone folder. Manually deleting images from the tombstone folder is possible, but pfaffman advises against it, as they would be permanently deleted.
Frank_Bailey mentions that the accumulated space of 17,000+ avatars is significant (around 2.5 GB). pfaffman suggests running ./launcher clean up to reclaim space from Docker. vinothkannans agrees that this command only removes files from the database.
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?