IT in Education

How to delete a user account

awsTypically you will delete user accounts using the front-end of Nextcloud. This article describes what happens when you delete a user account.


Log on to Nextcloud

Start by logging on with your admin account.

  1. Go to Avatar > Users.
  2. Click 3dotsHorizontal > Delete user, for the user account that you want to delete.

The user account will disappear from the front-end and be queued for deletion at the next Cron job. Depending on how often your Cron job is set to run, you might have to wait 5-10 minutes for the cron task to run. The deletion task itself can take up to 10 minutes to complete, depending on various factors.

OCC command

To be sure that the user account has been deleted you can run the following OCC command, and wait for it to complete.

php ./occ user:delete username

File deletion

I use Wasabi for data file storage, and I noticed that deleting user accounts, doesn't necessarily remove the files. The files in the S3 bucket at Wasabi are not easily accessible, nevertheless I'd like to know that they are gone.  I will keep an eye on this and confirm. 

Troubleshooting

I found that if I tried to create a new user account with the same name as the deleted account, during the period before it had been fully deleted, it would allow the creation of the new account, but all the previous files would be visible. To fix this issue, I ran the OCC command, and waited for the command to complete.


Thanks for visiting,
Steven