Použijte iterátory SCAN:https://pypi.python.org/pypi/redis for key in r.scan_iter("prefix:*"): r.delete(key)