2014-03-23 23:57:36 +00:00
|
|
|
# userdel
|
|
|
|
|
2021-02-07 19:05:03 +00:00
|
|
|
> Remove a user account or remove a user from a group.
|
2022-01-27 21:08:33 +00:00
|
|
|
> See also: `users`, `useradd`, `usermod`.
|
2021-04-17 13:19:41 +01:00
|
|
|
> More information: <https://manned.org/userdel>.
|
2014-03-23 23:57:36 +00:00
|
|
|
|
2021-02-07 19:05:03 +00:00
|
|
|
- Remove a user:
|
2014-03-23 23:57:36 +00:00
|
|
|
|
2022-01-27 21:08:33 +00:00
|
|
|
`sudo userdel {{username}}`
|
2021-02-07 19:05:03 +00:00
|
|
|
|
2022-01-27 21:08:33 +00:00
|
|
|
- Remove a user in other root directory:
|
2021-02-07 19:05:03 +00:00
|
|
|
|
2022-01-27 21:08:33 +00:00
|
|
|
`sudo userdel --root {{path/to/other/root}} {{username}}`
|
2021-02-07 19:05:03 +00:00
|
|
|
|
2022-01-27 21:08:33 +00:00
|
|
|
- Remove a user along with the home directory and mail spool:
|
2021-02-07 19:05:03 +00:00
|
|
|
|
2022-01-27 21:08:33 +00:00
|
|
|
`sudo userdel --remove {{username}}`
|