Redis Python – how to delete all keys according to a specific pattern In python, without python iterating May 26, 2023 by Tarik Use SCAN iterators: https://pypi.python.org/pypi/redis for key in r.scan_iter("prefix:*"): r.delete(key)