
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
redis-bulk-cleaner
Advanced tools
Deletes keys from Redis database in bulk.
Install it via PyPi
pip install redis_bulk_cleaner
Firstly check what are you going to delete with --dry-run option:
$ redis_bulk_cleaner 'test:unsubscribe_token:*' 'test:session:*' --dry-run
Search for keys:
test:unsubscribe_token:*, test:session:*
===========
test:unsubscribe_token:NDCivQ45KQcTghpS
test:session:NDCivQ45KQcTghpS
test:unsubscribe_token:9SBQ1YsDPuTETWBS
test:unsubscribe_token:MckwaZGER1GiVjoX
test:session:9SBQ1YsDPuTETWBS
test:session:MckwaZGER1GiVjoX
You could pass as many patterns as you want. Only overhead will be Regex matching slowdown.
Then to actually delete keys run it without --dry-run option:
$ redis_bulk_cleaner 'test:unsubscribe_token:*' 'test:session:*'
This tools will delete ANY key that matches any of the following pattern:
test:unsubscribe_token:*, test:session:*
Do you want to continue? (y, n): y
...
6 keys cleaned
Be ware: it uses regex matching so test* will also match test_other:key.
However any special symbols like .? will be escaped.
Note: because of SCAN behaviour it is not possible to calculate accurate estimate/percentage. Progress bar could go beyond 100%.
-D, --dry-run - Do not delete keys just print them
-r, --use-regex - By default patterns are redis-patterns (* equals any characters sequence including :).
If this flag is enabled then it will parse patterns as python regex expressions (some escaping may still be needed base on your shell type)
-s, --sleep - (milliseconds) Sleep between DELETE commands to prevent high memory and cpu usage. Disabled by default.-h, --host - Redis server host
localhost-p, --port - Redis server port
6379--db - Redis server db
0-P, --password - Redis server password
-b, '--batch' - Redis SCAN batch size
500--disable-cursor-backups
redis_cleaner:cursor)
so it will continue from same place after restart (in case of crash/network issues/etc)Also see redis_bulk_cleaner --help
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
Free software: MIT license
FAQs
Unknown package
We found that redis-bulk-cleaner demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.