> ## Content Index
> Fetch the complete content index at: https://developerinsider.co/llms.txt
> Use this file to discover other available public pages before exploring further.

# Delete .DS_Store and _.DS_Store files recursively
- URL: https://developerinsider.co/delete-ds_store-and-_-ds_store-files-recursively/
- Published: 2024-10-20T07:16:25.000Z
- Updated: 2024-10-25T08:58:27.000Z
- Author: Vineet Choudhary
- Tags: Tips, Linux

To delete all .DS\_Store files from subfolders (on macOS), you can use Terminal. Below are the steps to do it safely:

1. Open Terminal
2. Navigate to the directory where you want to delete all .DS\_Store files.  
For example, if the folder is in Documents, type:  
```sh  
cd ~/Documents/your-folder-name  
```
3. Run the following command to find and delete all `.DS_Store` and `_.DS_Store` files recursively:  
```sh  
sudo find . -type f \( -name ".DS_Store" -o -name "._.DS_Store" \) -delete -print 2>&1  
```
4. You can also verify the deletion file by running:  
```sh  
sudo find . -type f \( -name ".DS_Store" -o -name "._.DS_Store" \) -print 2>&1  
```  
If nothing is returned, all .DS\_Store files are successfully removed.