import shutil
shutil.rmtree('/tmp/some_folder')
remove recursive by patern:
import os
import glob
files = glob.glob('/tmp/some_folder/*db')
for f in files:
os.remove(f)
import shutil
shutil.rmtree('/tmp/some_folder')
remove recursive by patern:
import os
import glob
files = glob.glob('/tmp/some_folder/*db')
for f in files:
os.remove(f)