> ## Documentation Index
> Fetch the complete documentation index at: https://upstash.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Generic commands

> Commands for managing keys, expiration, serialization, and database-wide key operations.

> [card] [COPY](https://upstash.com/docs/redis/commands/generic/copy)
>
> Copy a key to another key

> [card] [DEL](https://upstash.com/docs/redis/commands/generic/del)
>
> Delete one or more keys

> [card] [DUMP](https://upstash.com/docs/redis/commands/generic/dump)
>
> Serialize a key's value

> [card] [EXISTS](https://upstash.com/docs/redis/commands/generic/exists)
>
> Check if keys exist

> [card] [EXPIRE](https://upstash.com/docs/redis/commands/generic/expire)
>
> Set a key's TTL in seconds

> [card] [EXPIREAT](https://upstash.com/docs/redis/commands/generic/expireat)
>
> Set expiry as Unix timestamp

> [card] [EXPIRETIME](https://upstash.com/docs/redis/commands/generic/expiretime)
>
> Get expiry as Unix timestamp

> [card] [KEYS](https://upstash.com/docs/redis/commands/generic/keys)
>
> Find keys matching a pattern

> [card] [MEMORY USAGE](https://upstash.com/docs/redis/commands/generic/memory-usage)
>
> Estimate memory used by a key

> [card] [PERSIST](https://upstash.com/docs/redis/commands/generic/persist)
>
> Remove the expiration from a key

> [card] [PEXPIRE](https://upstash.com/docs/redis/commands/generic/pexpire)
>
> Set a key's TTL in milliseconds

> [card] [PEXPIREAT](https://upstash.com/docs/redis/commands/generic/pexpireat)
>
> Set expiry as Unix ms timestamp

> [card] [PEXPIRETIME](https://upstash.com/docs/redis/commands/generic/pexpiretime)
>
> Get expiry as Unix ms timestamp

> [card] [PTTL](https://upstash.com/docs/redis/commands/generic/pttl)
>
> Get TTL in milliseconds

> [card] [RANDOMKEY](https://upstash.com/docs/redis/commands/generic/randomkey)
>
> Return a random key

> [card] [RENAME](https://upstash.com/docs/redis/commands/generic/rename)
>
> Rename a key

> [card] [RENAMENX](https://upstash.com/docs/redis/commands/generic/renamenx)
>
> Rename a key if new key doesn't exist

> [card] [RESTORE](https://upstash.com/docs/redis/commands/generic/restore)
>
> Deserialize and restore a key

> [card] [SCAN](https://upstash.com/docs/redis/commands/generic/scan)
>
> Incrementally iterate keys

> [card] [TOUCH](https://upstash.com/docs/redis/commands/generic/touch)
>
> Update last access time of keys

> [card] [TTL](https://upstash.com/docs/redis/commands/generic/ttl)
>
> Get TTL in seconds

> [card] [TYPE](https://upstash.com/docs/redis/commands/generic/type)
>
> Get the type of a key

> [card] [UNLINK](https://upstash.com/docs/redis/commands/generic/unlink)
>
> Delete keys asynchronously

> [card] [WAIT](https://upstash.com/docs/redis/commands/generic/wait)
>
> Wait for replica acknowledgements

> [card] [WAITAOF](https://upstash.com/docs/redis/commands/generic/waitaof)
>
> Wait for local and replica persistence


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.