Delete multiple Users

Hi,

how can I delete multiple users at once? We have to rework the user list quite a lot and until now I only found out how to delete 1 user by 1 with the admin interface.

Thanks!

You can delete a single user:
sudo -u www-data php occ user:delete username
(please test it first)

If you have got al text file “user.txt” with a list of users i think you can use a script to delete them:

for i in $(cat user.txt);do sudo -u www-data php occ user:delete $i;done
(sorry not tested)

https://docs.nextcloud.com/server/19/admin_manual/configuration_server/occ_command.html

If you only can use the web interface i think you have no possibility.
For bigger installation i think it is necessary to have shell access (ssh).
With OCC Web https://apps.nextcloud.com/apps/occweb (not in Nextcloud 19) you can not use the script above.

thanks for the answer!