userdel — stdin  stdout  - file  -- opt  --help  --version


userdel [-r] username

The userdel command deletes an existing user.

# userdel smith

It does not delete the files in the user’s home directory unless you supply the -r option. Think carefully before deleting a user; consider deactivating the account instead (with usermod -L). And make sure you have backups of all the user’s files before deleting them: you might need them again someday.

Get Linux Pocket Guide, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.