Använd SCAN-iteratorer:https://pypi.python.org/pypi/redis for key in r.scan_iter("prefix:*"): r.delete(key)