summaryrefslogtreecommitdiff
path: root/Base/usr/share/man/man8/userdel.md
blob: cbb46ab8d869a0d7a36ae25631cb0c90d819c7bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
## Name

userdel - delete a user account

## Synopsis

```**sh
# userdel [-r] <login>
```

## Description

This program deletes a user account in the system.

This program must be run as root.

## Options

* `-r`, `--remove`: Remove the home directory for this user if the directory exists.

## Exit Values

* 0 - Success
* 1 - Couldn't update the password file
* 6 - Specified user doesn't exist
* 12 - Couldn't remove home directory

## Files

* `/etc/passwd` - user information (such as UID and GID) in this file is deleted.
* `/home/` - user home directory is deleted if the `-r` flag is specified.

## Examples

```sh
# userdel alice
# userdel -r alice
# userdel --remove alice
```

## See Also

* [`useradd`(8)](help://man/8/useradd)