How to Clear All Redis Data?

How to Clear All Redis Data?

Run the FLUSHALL command to clear all the data in the instance. Run the FLUSHDB command to clear the data in the currently selected DB. Data of a DCS Redis 4.0 or 5.0 instance can be cleared all at once on the console or by the FLUSHDB or FLUSHALL command in redis-cli.

How do I delete all data from Redis?

Delete All Data on Redis
  1. To Delete all data/keys of all Redis databases use FLUSHALL command. redis-cli FLUSHALL.
  2. Delete all data/keys of the currently selected Redis database using FLUSHDB. redis-cli FLUSHDB.
  3. Specify a database name with FLUSHDB to delete all data/keys of the specified Redis database.

How do I delete a database in Redis?

To delete a database in Redis Enterprise Software:
  1. Click the relevant database row in the Databases page. The selected database page appears.
  2. Select the Configuration tab.
  3. Click Delete at the bottom of the page.
  4. Confirm the deletion.
Elena Rostova
Author

Elena Rostova

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.