import os
folder_path = "yourself file path"
for root, dirs, files in os.walk(folder_path):
for filename in files:
if filename == '.DS_Store':
file_path = os.path.join(root, filename)
os.remove(file_path)
print("delete ok")