{"id":37070085,"url":"https://github.com/bogdandm/redis_bulk_cleaner","last_synced_at":"2026-01-14T08:04:20.576Z","repository":{"id":45652005,"uuid":"298248850","full_name":"bogdandm/redis_bulk_cleaner","owner":"bogdandm","description":"Deletes keys from Redis database in bulk.","archived":false,"fork":false,"pushed_at":"2024-09-24T11:53:55.000Z","size":34,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-13T21:30:41.297Z","etag":null,"topics":["cleaner","large-scale","redis","utils"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bogdandm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-24T10:46:49.000Z","updated_at":"2024-12-25T08:40:08.000Z","dependencies_parsed_at":"2022-09-15T20:50:55.192Z","dependency_job_id":null,"html_url":"https://github.com/bogdandm/redis_bulk_cleaner","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/bogdandm/redis_bulk_cleaner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bogdandm%2Fredis_bulk_cleaner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bogdandm%2Fredis_bulk_cleaner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bogdandm%2Fredis_bulk_cleaner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bogdandm%2Fredis_bulk_cleaner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bogdandm","download_url":"https://codeload.github.com/bogdandm/redis_bulk_cleaner/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bogdandm%2Fredis_bulk_cleaner/sbom","scorecard":{"id":246876,"data":{"date":"2025-08-11","repo":{"name":"github.com/bogdandm/redis_bulk_cleaner","commit":"8843ded98291df0605a0486e8bf4731fee375b76"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/26 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2021-437 / GHSA-5xp3-jfq3-5q8x","Warn: Project is vulnerable to: PYSEC-2023-228 / GHSA-mq26-g339-26xf","Warn: Project is vulnerable to: PYSEC-2022-43017 / GHSA-qwmp-2cf2-g9g6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T07:45:58.592Z","repository_id":45652005,"created_at":"2025-08-17T07:45:58.592Z","updated_at":"2025-08-17T07:45:58.592Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28413527,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cleaner","large-scale","redis","utils"],"created_at":"2026-01-14T08:04:19.893Z","updated_at":"2026-01-14T08:04:20.564Z","avatar_url":"https://github.com/bogdandm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# redis-bulk-cleaner\n\n![Python](https://img.shields.io/pypi/pyversions/redis_bulk_cleaner)\n[![PyPi](https://img.shields.io/pypi/v/redis_bulk_cleaner.svg)](https://pypi.python.org/pypi/redis_bulk_cleaner)\n[![image](https://img.shields.io/travis/bogdandm/redis_bulk_cleaner.svg)](https://travis-ci.com/bogdandm/redis_bulk_cleaner)\n\nDeletes keys from [Redis](https://redis.io/) database in bulk.\n\n## Features\n\n* Built for very large scale databases (10Gb+, 100 000 000+ keys)\n* Uses SCAN operation so it is safe to run it without downtime\n* Could process multiple patterns using only one SCAN operation\n* Has option to search for given patterns, but not delete them\n\n## Usage\n\n\nInstall it via [PyPi](https://pypi.python.org/pypi/redis_bulk_cleaner)\n```\npip install redis_bulk_cleaner\n```\n\nFirstly check what are you going to delete with `--dry-run` option:\n```\n$ redis_bulk_cleaner 'test:unsubscribe_token:*' 'test:session:*' --dry-run\nSearch for keys:\ntest:unsubscribe_token:*, test:session:*\n===========\ntest:unsubscribe_token:NDCivQ45KQcTghpS\ntest:session:NDCivQ45KQcTghpS\ntest:unsubscribe_token:9SBQ1YsDPuTETWBS\ntest:unsubscribe_token:MckwaZGER1GiVjoX\ntest:session:9SBQ1YsDPuTETWBS\ntest:session:MckwaZGER1GiVjoX\n```\n\nYou could pass as many patterns as you want. Only overhead will be Regex matching slowdown.\n\nThen to actually delete keys run it without `--dry-run` option:\n```\n$ redis_bulk_cleaner 'test:unsubscribe_token:*' 'test:session:*'\nThis tools will delete ANY key that matches any of the following pattern:\ntest:unsubscribe_token:*, test:session:*\nDo you want to continue? (y, n): y\n...\n6 keys cleaned\n```\n\nBe ware: it uses regex matching so `test*` will also match `test_other:key`.\nHowever any special symbols like `.?` will be escaped.\n\n[![asciicast](https://asciinema.org/a/A88rPFJcc5eRo54YDtiaTgeOW.svg)](https://asciinema.org/a/A88rPFJcc5eRo54YDtiaTgeOW)\n\nNote: because of SCAN behaviour it is not possible to calculate accurate estimate/percentage.\nProgress bar could go beyond 100%.\n\n* `-D`, `--dry-run` - Do not delete keys just print them\n    * **Default**: disabled\n* `-r`, `--use-regex` - By default patterns are redis-patterns (`*` equals any characters sequence including `:`).\n  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)\n    * **Default**: disabled\n* `-s`, `--sleep` - (milliseconds) Sleep between DELETE commands to prevent high memory and cpu usage. Disabled by default.\n* `-h`, `--host` - Redis server host\n    * **Default**: `localhost`\n* `-p`, `--port` - Redis server port\n    * **Default**: `6379`\n* `--db` - Redis server db\n    * **Default**: `0`\n* `-P`, `--password` - Redis server password\n    * **Default**: No password\n* `-b`, '--batch' - Redis SCAN batch size\n    * Too small value will cause slowdown, too high value could lead to memory issues/timeouts\n    * **Default**: `500`\n* `--disable-cursor-backups`\n    * By default current scan position is saving to temporary redis variable (`redis_cleaner:cursor`)\n      so it will continue from same place after restart (in case of crash/network issues/etc)\n    * **Default**: Enabled\n\nAlso see `redis_bulk_cleaner --help`\n\n## Credits\n\nThis package was created with\n[Cookiecutter](https://github.com/audreyr/cookiecutter) and the\n[audreyr/cookiecutter-pypackage](https://github.com/audreyr/cookiecutter-pypackage)\nproject template.\n\n----\n\nFree software: MIT license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbogdandm%2Fredis_bulk_cleaner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbogdandm%2Fredis_bulk_cleaner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbogdandm%2Fredis_bulk_cleaner/lists"}