Python:shutil lastmod 2021-07-05created 2021-07-051 edits rmtree Removes all subdirectories. import shutil dir_path = '/tmp/img' try: shutil.rmtree(dir_path) except OSError as e: print("Error: %s : %s" % (dir_path, e.strerror)) See also python Pages that link here Pytest-cov Python Python:os Python:pathlib Python:StandardLibrary author Zer0 sitemap