# RESET

> Return the connection to the state it had when it was opened.

URL: https://docs.hotkv.com/commands/reset/

```
RESET
```

- Group: Connection
- Complexity: O(1)
- HotKV Cloud: all plans
- On-Premise: no license needed

`RESET` clears what a connection has set up, without closing it. Connection
pools use it before handing a connection to the next user. It can be sent at
any time, including before authentication and inside a transaction.

After `RESET` the connection:

- has no open transaction (queued commands are discarded) and watches no keys
- is unsubscribed from every channel, pattern and shard channel
- no longer receives [MONITOR](https://docs.hotkv.com/commands/monitor/index.md) output
- uses RESP2 and has no name
- uses database `0`
- has `READONLY`, `ASKING` and [CLIENT NO-EVICT](https://docs.hotkv.com/commands/client-no-evict/index.md) turned off
- has [client-side caching](https://docs.hotkv.com/develop/client-side-caching/index.md) tracking turned off
- is the `default` user, logged in only if that user needs no password

## Return value

Simple string `RESET` in RESP2 and RESP3.

## Examples

```
127.0.0.1:6379> SELECT 2
OK
127.0.0.1:6379[2]> MULTI
OK
127.0.0.1:6379[2](TX)> SET k v
QUEUED
127.0.0.1:6379[2](TX)> RESET
RESET
127.0.0.1:6379> EXISTS k
(integer) 0
```

In HotKV Cloud, the CLI tab of the panel does not run `RESET`. Send it from
your own client connection.

## Compatibility

Same reply as Redis 7 and Valkey 8. Unlike Redis, `RESET` leaves the
[CLIENT NO-TOUCH](https://docs.hotkv.com/commands/client-no-touch/index.md) and
[CLIENT REPLY](https://docs.hotkv.com/commands/client-reply/index.md) settings as they were. It does turn
off client-side caching tracking (see [CLIENT TRACKING](https://docs.hotkv.com/commands/client-tracking/index.md)).

## See also

[AUTH](https://docs.hotkv.com/commands/auth/index.md), [HELLO](https://docs.hotkv.com/commands/hello/index.md),
[DISCARD](https://docs.hotkv.com/commands/discard/index.md), [UNWATCH](https://docs.hotkv.com/commands/unwatch/index.md),
[SELECT](https://docs.hotkv.com/commands/select/index.md)