Easy way to clean up suspended bot accounts?


Recently, my instance was hit with a lot of bot account sign ups. I’ve taken steps to mitigate these bots from signing up in the future. However, even though I suspended the accounts via the web interface, they still show as being users on the front page in the “Home to X amount of users” counter.

Is there anyway to have these suspended bot accounts cleaned up, and completely removed?

One way which is totally unsafe if you have non-spam suspended accounts would be to destroy any suspended account:

RAILS_ENV=production bundle exec rails runner 'Account.suspended.pluck(:username).each { |u| `tootctl delete #{u}` }'

or you can upgrade to 2.6.3.