Forrest logo
back to the redis-cli tool

redis:queue:flush

Flush a Redis queue
$ redis-cli ${password} -n ${database} flushdb
try on your machine

This is a command used to delete all the keys from a specific Redis database.

Here is the explanation of the command components:

  • redis-cli: This is the Redis Command Line Interface (CLI) which is used to interact with Redis.
  • ${password}: This is a variable that represents the password to access the Redis instance. If a password is required to access Redis, it must be provided here. If no password is required, this can be omitted.
  • -n ${database}: This option is used to specify which database to flush. Redis allows multiple databases to be used at the same time, and each database is identified by a number. This option specifies which database to use.
  • flushdb: This command is used to delete all data stored in the specified Redis database.

So, when this command is executed, it will delete all the keys present in the specified Redis database.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the redis-cli tool