# ACL DELUSER

> Delete one or more ACL users and disconnect the clients logged in as them.

URL: https://docs.hotkv.com/commands/acl-deluser/

```
ACL DELUSER username [username ...]
```

- Group: ACL
- Complexity: O(N) where N is the number of users
- HotKV Cloud: all plans
- On-Premise: no license needed

`ACL DELUSER` deletes the named users. Clients that are logged in as a
deleted user are disconnected. Names that do not exist are ignored. The
`default` user cannot be deleted; to lock it, turn it off or give it a
password with [ACL SETUSER](https://docs.hotkv.com/commands/acl-setuser/index.md).

The change lives in memory. Run [ACL SAVE](https://docs.hotkv.com/commands/acl-save/index.md) to write it
to `aclfile`.

## Return value

| Case | RESP2 | RESP3 |
| --- | --- | --- |
| Success | Integer: the number of users deleted | Integer |
| `default` among the names | Error `ERR the 'default' user cannot be removed` (nothing is deleted) | Same error |

## Examples

```
127.0.0.1:6379> ACL DELUSER reports olduser nosuchuser
(integer) 2
127.0.0.1:6379> ACL DELUSER default
(error) ERR the 'default' user cannot be removed
```

## Compatibility

Same as Redis 7 and Valkey 8.

## See also

[ACL SETUSER](https://docs.hotkv.com/commands/acl-setuser/index.md), [ACL USERS](https://docs.hotkv.com/commands/acl-users/index.md),
[ACL SAVE](https://docs.hotkv.com/commands/acl-save/index.md)