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