mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
30 lines
701 B
Plaintext
30 lines
701 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, linux]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# deluser
|
|
|
|
> Delete a user from the system.
|
|
> More information: <https://manned.org/deluser>.
|
|
|
|
- Remove a user:
|
|
|
|
`sudo deluser {{username}}`
|
|
|
|
- Remove a user and their home directory:
|
|
|
|
`sudo deluser --remove-home {{username}}`
|
|
|
|
- Remove a user and their home, but backup their files into a `.tar.gz` file in the specified directory:
|
|
|
|
`sudo deluser --backup-to {{path/to/backup_directory}} --remove-home {{username}}`
|
|
|
|
- Remove a user, and all files owned by them:
|
|
|
|
`sudo deluser --remove-all-files {{username}}`
|
|
|
|
- Remove a user from a group, without deleting the user:
|
|
|
|
`sudo deluser {{username}} {{group}}`
|