O'Reilly logo

Linux Pocket Guide, 2nd Edition by Daniel J. Barrett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

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

Synopsis

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required