Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Caching Server»How To Delete All Data in Redis

    How To Delete All Data in Redis

    RahulBy RahulNovember 18, 20181 Min ReadUpdated: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
      
    redis redis-cli
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to Install CodeIgniter on Ubuntu 18.04 (Bionic)
    Next Article How To Install FFmpeg on Debian 9 (Stretch)

    Related Posts

    How to Install Redis on Debian 11 Linux

    Updated:September 16, 20213 Mins Read

    How To Install Memcached on Ubuntu 20.04

    3 Mins Read

    How To Install Redis on Debian 10

    Updated:July 7, 20203 Mins Read

    How to Install Redis on Ubuntu 20.04

    3 Mins Read

    How to Install Redis on CentOS 8

    3 Mins Read

    How To Install Memcached on Fedora 35/34/33

    Updated:April 18, 20223 Mins Read

    Leave A Reply Cancel Reply

    Recent Posts
    • How to Install JAVA on Ubuntu 22.04
    • Switching Display Manager in Ubuntu – GDM, LightDM & SDDM
    • Changing the Login Screen Background in Ubuntu 22.04 & 20.04
    • How To Install PHP (8.1, 7.4 or 5.6) on Ubuntu 22.04
    • (Resolved) Please install all available updates for your release before upgrading
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.