tldr/pages/linux/deluser.md

21 lines
541 B
Markdown
Raw Normal View History

2021-02-07 19:05:03 +00:00
# deluser
> Delete a user from the system.
> More information: <https://manpages.debian.org/latest/adduser/deluser.html>.
2021-02-07 19:05:03 +00:00
- Remove a user:
`sudo deluser {{username}}`
2021-02-07 19:05:03 +00:00
- Remove a user and their home directory:
`sudo deluser --remove-home {{username}}`
2021-02-07 19:05:03 +00:00
- 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}}`
2021-02-07 19:05:03 +00:00
- Remove a user, and all files owned by them:
`sudo deluser --remove-all-files {{username}}`