• Wincent
    Open
  • Blog
  • Wiki
  • Snippets
  • Tags
  • Search

Mass-deleting Redis keysEdit

Created 5/19/2017, updated 7/9/2021

Example

redis-cli --scan --pattern "masochist:[12345]:*" | xargs -L 100 redis-cli DEL

For more context, see this issue.

For alternative means, see this Stack Overflow question.

You can delete everything easily with (via Stack Overflow):

redis-cli flushall
  • redis
  • wiki
Site
  • About
  • Blog
  • Wiki
  • Snippets
  • Tags
  • Search
External
  • GitHub
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
Colophon

Made by Greg Hurrell using React, Relay and GraphQL (with help from Git, Redis and Neovim).