> ## 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.

> **[COPY](/docs/redis/commands/generic/copy)**
>
> Copy a key to another key

> **[DEL](/docs/redis/commands/generic/del)**
>
> Delete one or more keys

> **[DUMP](/docs/redis/commands/generic/dump)**
>
> Serialize a key's value

> **[EXISTS](/docs/redis/commands/generic/exists)**
>
> Check if keys exist

> **[EXPIRE](/docs/redis/commands/generic/expire)**
>
> Set a key's TTL in seconds

> **[EXPIREAT](/docs/redis/commands/generic/expireat)**
>
> Set expiry as Unix timestamp

> **[EXPIRETIME](/docs/redis/commands/generic/expiretime)**
>
> Get expiry as Unix timestamp

> **[KEYS](/docs/redis/commands/generic/keys)**
>
> Find keys matching a pattern

> **[MEMORY USAGE](/docs/redis/commands/generic/memory-usage)**
>
> Estimate memory used by a key

> **[PERSIST](/docs/redis/commands/generic/persist)**
>
> Remove the expiration from a key

> **[PEXPIRE](/docs/redis/commands/generic/pexpire)**
>
> Set a key's TTL in milliseconds

> **[PEXPIREAT](/docs/redis/commands/generic/pexpireat)**
>
> Set expiry as Unix ms timestamp

> **[PEXPIRETIME](/docs/redis/commands/generic/pexpiretime)**
>
> Get expiry as Unix ms timestamp

> **[PTTL](/docs/redis/commands/generic/pttl)**
>
> Get TTL in milliseconds

> **[RANDOMKEY](/docs/redis/commands/generic/randomkey)**
>
> Return a random key

> **[RENAME](/docs/redis/commands/generic/rename)**
>
> Rename a key

> **[RENAMENX](/docs/redis/commands/generic/renamenx)**
>
> Rename a key if new key doesn't exist

> **[RESTORE](/docs/redis/commands/generic/restore)**
>
> Deserialize and restore a key

> **[SCAN](/docs/redis/commands/generic/scan)**
>
> Incrementally iterate keys

> **[TOUCH](/docs/redis/commands/generic/touch)**
>
> Update last access time of keys

> **[TTL](/docs/redis/commands/generic/ttl)**
>
> Get TTL in seconds

> **[TYPE](/docs/redis/commands/generic/type)**
>
> Get the type of a key

> **[UNLINK](/docs/redis/commands/generic/unlink)**
>
> Delete keys asynchronously

> **[WAIT](/docs/redis/commands/generic/wait)**
>
> Wait for replica acknowledgements

> **[WAITAOF](/docs/redis/commands/generic/waitaof)**
>
> Wait for local and replica persistence


## Related topics

- [Vector commands](/docs/redis/commands/vector/overview.md)
- [SEARCH.LISTINDEXES](/docs/redis/commands/search/search-listindexes.md)
- [Redis® API Compatibility: supported commands, modules, and protocols](/docs/redis/overall/compatibility.md)
- [Listen Keyspace Notifications](/docs/redis/howto/keyspacenotifications.md)
- [Document Updates](/docs/redis/search/document-updates.md)


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