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.
Get Linux Pocket Guide, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.