Usage

WARNING: Be careful with deluser / groupdel! If you use deluser / groupdel, it will delete the user account but leave all existing processes and files running with the same UID and GID.

This causes two problems:

  1. Existing user processes continue to run
  2. A new user could inadvertently get access to all the old user's files and processes

Moreover, you may need to watch out for user cronjobs that might still execute after an account is deleted.

It's recommended to use usermod -Z to freeze accounts, and -U to unfreeze them.