Try shutil.rmtree
:
import shutil
shutil.rmtree('/path/to/your/dir/')
More Related Contents:
- How can I safely create a nested directory?
- How do I delete a file or folder in Python?
- Find the current directory and file’s directory [duplicate]
- Importing modules from parent folder
- How can I iterate over files in a given directory?
- How do I get the full path of the current file’s directory?
- How do you get a directory listing sorted by creation date in python?
- Directory-tree listing in Python
- Calculating a directory’s size using Python?
- How do I get the path of the current executed file in Python?
- How to reliably open a file in the same directory as the currently running script
- How can I find script’s directory? [duplicate]
- Iterating through directories with Python
- How to config nltk data directory from code?
- How to find the real user home directory using python?
- Reading the target of a .lnk file in Python?
- Renaming multiple files in a directory using Python
- How to select a directory and store the location using tkinter in Python
- Import from sibling directory
- Python not recognising directories os.path.isdir() [duplicate]
- python – Finding the user’s “Downloads” folder
- Deleting read-only directory in Python
- How can I delete a file or folder in Python?
- How can I safely create a directory (possibly including intermediate directories)?
- Extract a part of the filepath (a directory) in Python
- Determining Whether a Directory is Writeable
- Find all CSV files in a directory using Python
- Creating files and directories via Python
- Handling directories with spaces Python subprocess.call()
- How do I create a directory, and any missing parent directories?