How to Remove .Ds_Store Files on Mac OS X
The Finder automatically places a .DS_Store file into every folder you have opened. .DS_Store files are created by the Finder during its normal course of operation. These files hold view options, including the positions of icons, size of...
Method 1 of 2:
You must now navigate to the folder with the corrupted .DS_Store file or this procedure won't correct your problem (unless it's the folder where terminal naturally opens, usually your home folder. There are two methods to accomplish this task.
- Method 1: Use the 'cd' (Change Directory) command along with the path to the folder in need of repair.
- To translate what you do in Finder to a written path, start by clicking 'Macintosh HD' on your desktop. This will become '/'. Click the next folder. The name will follow the '/' so type another '/' before any more folder names. For example, if the folder you are having issues with is 'Macintosh HD' -> 'Applications', the path to this folder is '/Applications'. If the problem folder was the 'Utilities' folder inside 'Applications', the path would be '/Applications/Utilities'.
- Type cd /path (example: cd /Applications) then press Return.
- To translate what you do in Finder to a written path, start by clicking 'Macintosh HD' on your desktop. This will become '/'. Click the next folder. The name will follow the '/' so type another '/' before any more folder names. For example, if the folder you are having issues with is 'Macintosh HD' -> 'Applications', the path to this folder is '/Applications'. If the problem folder was the 'Utilities' folder inside 'Applications', the path would be '/Applications/Utilities'.
- Method 2: We can use the 'cd' command and drag the folder to terminal which automatically completes the path building process for you.
- Type cd in terminal followed by a space
- Find the folder with the issue but DON'T OPEN IT, drag its icon into terminal. Watch it complete the path for you. Press Return.
- Type cd in terminal followed by a space
Method 2 of 2:
Delete the .DS_Store File
You can now remove the .DS_Store folder and all its contents with one very powerful command. The 'rm' (Remove) modified by '-f' removes all files and folders contained in the target name. DO NOT MIS-TYPE this command.
-
Type rm -f .DS_Store and press Return. Terminal will ask for no confirmation and give no indication that this has been completed - it will only return a message if the command did not work. - You should now be able to navigate to the folder in finder and the issue should be corrected.
Similar Post
- Remove stubborn files on the computer - 100% successful
- How to remove .bworm Files virus
- What is the 'Your personal files are encrypted' virus? How to remove it?
- How to remove watermark copyright mark, delete Watermark on PDF files
- How to remove noise from audio files with Audacity
- Manage files and folders in Python

