import shutil shutil.rmtree('/folder_name') shutil.rmtree('/folder_name', ignore_errors=True) # for read only files