Name

userdel

Synopsis

userdel [option] user

System administration command. Delete all entries for user in system account files.

Option

-f, --force

Remove the user even if they are currently logged in. Remove home directory and mail spool even if they are used by another user. Remove group too, if USERGROUPS_ENAB is set to yes in /etc/login.defs.

-r, --remove

Remove the home directory of user and any files contained in it.

Get Linux in a Nutshell, 6th 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.