userdel
Userdel is a command used on Unix-like operating systems to delete a user account from the local system. It removes the user’s entries from the system account databases (such as /etc/passwd and /etc/shadow) and from group structures (such as /etc/group) so the account can no longer be used to log in. By itself, userdel does not delete files owned by the user on the filesystem; those files usually remain unless explicitly removed.
Usage and options can vary by distribution, but common behavior is consistent across many Linux systems. The
- The user should not be logged in, and no processes should be running under that user, to
- After deletion, files owned by the user remain unless removed separately; use find or similar tools
- On some systems, auxiliary tools (such as deluser on Debian-based systems) offer similar functionality with different
See also: useradd, deluser/delgroup, passwd. The exact behavior and options can vary between Linux distributions and