• Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us
TecAdmin
Menu
  • Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us

How To Delete All Data in Redis

Written by Rahul, Updated on February 27, 2020

Redis provides CLI utility to manage Redis databases through the command line. It provides two commands FLUSHDB and FLUSHALL to flush database cache and remove all keys on Redis databases.

  • FLUSHALL – Used to delete all keys from all databases on Redis server.
  • FLUSHDB – Used to delete all keys of currently selected database or specified database.

Delete All Data on Redis

  • To Delete all data/keys of all Redis databases use FLUSHALL command.
    redis-cli FLUSHALL 
    
  • Delete all data/keys of the currently selected Redis database using FLUSHDB.
    redis-cli FLUSHDB
    
  • Specify a database name with FLUSHDB to delete all data/keys of the specified Redis database. Each Redis database refers to a unique numeric index number.
    redis-cli -n database_index FLUSHDB
    

Share it!
Share on Facebook
Share on Twitter
Share on LinkedIn
Share on Reddit
Share on Tumblr
Share on Whatsapp
Rahul
Rahul
Connect on Facebook Connect on Twitter

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

Leave a Reply Cancel reply

Popular Posts

  • How To Install Python 3.9 on Ubuntu 20.04 5
  • How to Install Python 3.9 on CentOS/RHEL 7 & Fedora 32/31 0
  • How To Install VNC Server on Ubuntu 20.04 1
  • How To Install NVM on macOS with Homebrew 0
  • How to Install .NET Core on Debian 10 0
© 2013-2020 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy