↑ ↓ select, Enter open, Esc close

Flush all Redis databases (FLUSHALL)

user@server
redis-cli FLUSHALL

Empties all databases of the server at once, unlike FLUSHDB, which only affects the selected database. On a server with several websites, all of them lose their cache at the same time, which briefly causes high load on PHP and MySQL. If persistence is enabled, the saved dataset is also overwritten on the next save.

Note: Only use this when you really mean the whole server. Sessions, queues and other persistent data in Redis are lost as well.

Also searched as

  • clear entire redis cache
  • flush all redis data
  • run redis flushall

Related one-liners

All in Redis and Memcached

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.