Skip to content

Instantly share code, notes, and snippets.

@manishprajapatidev
Last active August 5, 2021 09:43
Show Gist options
  • Save manishprajapatidev/ea8624199c14bb658149da010b756191 to your computer and use it in GitHub Desktop.
Save manishprajapatidev/ea8624199c14bb658149da010b756191 to your computer and use it in GitHub Desktop.
Delete all users in one command line (except admin):
/opt/ejabberd-20.12/bin# ./ejabberdctl registered_users localhost | sed -n '/admin/!p' | xargs -n 1 -I {} bash -c 'sudo ./ejabberdctl unregister {} localhost'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment