Created
March 9, 2021 15:41
-
-
Save jamesholcomb/762480ee236d4b7bd539bb0ddf0f136f to your computer and use it in GitHub Desktop.
The definitive script to remove keys by pattern including spaces from redis on MacOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
redis-cli --scan --pattern "myprefix:*" | tr \\n \\0 | xargs -0 redis-cli unlink |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment