Skip to content

The Eclectic Light Company

Macs & painting – 🦉 No AI content
Main navigation
  • Downloads
  • Freeware
  • M-series Macs
  • Mac Problems
  • Mac articles
  • Macs
  • Art
hoakley November 15, 2025 Macs, Technology

Explainer: .DS_Store files

Here’s a bonus riddle for this weekend: what’s so invisible you can never see it in the Finder, is in many of the folders in your Home folder, and can break your backups? The answer is a .DS_Store file, officially a Desktop Services Store. Although they might appear more ancient, they originated in Mac OS X when its Finder was being rewritten from scratch in 1999.

It had been intended that Desktop Services would eventually gain a public API, but somewhere along the line Apple decided to keep it private, and their format and function have never been officially documented. Its name starts with a dot/stop/period to make it invisible in the Finder, and since macOS Sierra it has been made invisible even when the Finder reveals other invisible files. Currently the best way to see it is in Terminal, where the -a option to ls should include .DS_Store files.

They can be confused with another annoying but more useful hidden file: shadow files whose names start with ._ that are used to carry extended attribute data as part of the AppleDouble file format used on some FAT file systems. They too are invisible in the Finder even when hidden files are supposed to be displayed, but are associated with individual files rather than folders.

Function

The Finder will normally create a .DS_Store file in a folder that you have write access to, when some change is made to it in the Finder, such as creating or copying a file into that folder.

.DS_Store files contain a folder’s custom attributes, data like icon positions, and in more recent versions of macOS custom settings for the display of file metadata.

Among the most important of their contents for some users are Finder or Spotlight Comments, which are normally displayed in the Comments section of the Get Info dialog for a file. Those comments may also be duplicated in the com.apple.metadata:kMDItemFinderComment extended attribute (xattr) of that file, but that’s a secondary copy that can fall out of sync with what’s stored in the .DS_Store file, and the Finder ignores the xattr anyway. The reliance of Finder Comments on invisible .DS_Store files can lead to their unreliability compared with other forms of metadata.

Problems

You’re more likely to come across .DS_Store files when they make a nuisance of themselves by tripping something up. Send a folder from your Mac to a Windows or Linux system, for example, and it’s likely to confuse the recipient with that mysterious extra file that you can’t see at all. Send a folder to another Mac by AirDrop, and any .DS_Store file inside it will also accompany its visible contents. That in turn can cause problems with some backup utilities if it results in an older .DS_Store file being found in a folder that has already been backed up with a newer one.

Recent versions of macOS should no longer write .DS_Store files to computers connected to them over a network. If you want to stop them from being exposed in network volumes of older systems, use the command
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
to disable that. One place .DS_Store files can prove particularly troublesome is in Git repositories. Mikey @0xmachos has provided a simple solution for eradicating them.

At one stage Apple even recommended that they should be explicitly excluded from servers used for network backups or other storage. They can trip up revision control systems, baffle those who open archives created on a Mac, stop folder copying, and confound folder comparison. The simple solution to these, as with so many other problems with .DS_Stores, is to open the folder containing that hidden file, move some of its contents about to force it to be refreshed, and move on.

In the past, .DS_Store files have been suspected of leaking data, and were involved in at least one security vulnerability. Thankfully they now seem as puzzling and opaque to the developers of malware as they are to other users, but I’m sure that one day, someone else will try to do bad things with them again.

Removal

You can recursively delete .DS_Store files from a hierarchy using the command
find . -name .DS_Store -delete
and Ross Tulloch’s BlueHarvest can automatically remove them.

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Threads (Opens in new window) Threads
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to email a link to a friend (Opens in new window) Email
  • Click to print (Opens in new window) Print
Like Loading...

Related

Posted in Macs, Technology and tagged .DS_Store, BlueHarvest, comment, Finder, metadata. Bookmark the permalink.

6Comments

Add yours
  1. 1
    Enzo Vincenzo's avatar
    Enzo Vincenzo on November 15, 2025 at 8:28 am
    Reply

    Thanks Howard! Great article.
    I would like to take this opportunity to suggest that with exFAT discs and various USB sticks, to delete all shadow files, I always use the Terminal command
    dot_clean -v
    After the command and a space, I enter the path of the disc or stick, or better yet, I drag the icon directly into the Terminal window after the above command and space.
    The -v flag is very useful because it allows you to see what is happening and the final result.
    I often also preface the command with
    sudo
    because this also deletes the shadow files of Spotlight folders and other items.

    LikeLiked by 1 person

    • 2
      hoakley's avatar
      hoakley on November 15, 2025 at 10:35 am
      Reply

      Well, Enzo, this article isn’t about those shadow files. I think before anyone starts making recommendations they need to explain the potential disadvantages. In that case, if you’re using the storage to transfer files between two Macs, you could regret deleting all their extended attributes. They can carry wanted metadata, and aren’t a waste of space, which is why macOS is careful to write those shadow files in the first place.
      Howard.

      LikeLiked by 1 person

      • 3
        Enzo Vincenzo's avatar
        Enzo Vincenzo on November 15, 2025 at 3:12 pm
        Reply

        Well said, Howard! I understand exactly what you mean. In fact, in my case, shadow files mainly contain metadata with custom icons, so I don’t delete them as long as I’m the only one using extFAT or NTFS discs or USB sticks.
        But I was thinking about most users who, when sharing their external drives or USB sticks with Windows users, who are also inexperienced, get confused and often think that the data is corrupted because they try to open the shadow files instead of the original files.
        This happened to me with the nice owner of a photography shop where I sent some of my children to have photos printed in photographic quality or enlarged.

        LikeLiked by 1 person

  2. 4
    Michael Bach's avatar
    Michael Bach on November 15, 2025 at 1:47 pm
    Reply

    Thank you! Lots of new information for me. So finally I know what the “DS” stands for… And, of course, a global (dot)gitignore for them is best, hadn’t thought of that. What a useful Saturday morning :).

    LikeLiked by 1 person

  3. 5
    markbot2zero's avatar
    markbot2zero on November 15, 2025 at 8:24 pm
    Reply

    Thank you, Howard, for explaining the ubiquitous (and mysterious) .DS_store and for the link to Arno Gourdal’s site.

    Mr Gourdal gives a glimpse into the creative and managerial process at Apple or, I should say, Apple of twenty-five years ago, highly dependent as it was upon Steve Jobs.

    He writes, “In the next two minutes, I’m about to meet and get fired by Steve Jobs.”

    SPOILER ALERT: Arno Gourdal was not fired by Steve Jobs, who was a superb recruiter and motivator of technical talent — among many other gifts.

    -Mark

    LikeLiked by 1 person

  4. 6
    Paul R's avatar
    Paul R on November 17, 2025 at 7:01 pm
    Reply

    The developer of Carbon Copy Cloner offers some advice for navigating these problems.

    LikeLiked by 1 person

Leave a reply to Michael Bach Cancel reply

Quick Links

  • Free Software Menu
  • System Updates
  • M-series Macs
  • Mac Troubleshooting Summary
  • Mac problem-solving
  • Painting topics
  • Painting
  • Long Reads

Search

Monthly archives

  • December 2025 (66)
  • November 2025 (74)
  • October 2025 (75)
  • September 2025 (78)
  • August 2025 (76)
  • July 2025 (77)
  • June 2025 (74)
  • May 2025 (76)
  • April 2025 (73)
  • March 2025 (78)
  • February 2025 (67)
  • January 2025 (75)
  • December 2024 (74)
  • November 2024 (73)
  • October 2024 (78)
  • September 2024 (77)
  • August 2024 (75)
  • July 2024 (77)
  • June 2024 (71)
  • May 2024 (79)
  • April 2024 (75)
  • March 2024 (81)
  • February 2024 (72)
  • January 2024 (78)
  • December 2023 (79)
  • November 2023 (74)
  • October 2023 (77)
  • September 2023 (77)
  • August 2023 (72)
  • July 2023 (79)
  • June 2023 (73)
  • May 2023 (79)
  • April 2023 (73)
  • March 2023 (76)
  • February 2023 (68)
  • January 2023 (74)
  • December 2022 (74)
  • November 2022 (72)
  • October 2022 (76)
  • September 2022 (72)
  • August 2022 (75)
  • July 2022 (76)
  • June 2022 (73)
  • May 2022 (76)
  • April 2022 (71)
  • March 2022 (77)
  • February 2022 (68)
  • January 2022 (77)
  • December 2021 (75)
  • November 2021 (72)
  • October 2021 (75)
  • September 2021 (76)
  • August 2021 (75)
  • July 2021 (75)
  • June 2021 (71)
  • May 2021 (80)
  • April 2021 (79)
  • March 2021 (77)
  • February 2021 (75)
  • January 2021 (75)
  • December 2020 (77)
  • November 2020 (84)
  • October 2020 (81)
  • September 2020 (79)
  • August 2020 (103)
  • July 2020 (81)
  • June 2020 (78)
  • May 2020 (78)
  • April 2020 (81)
  • March 2020 (86)
  • February 2020 (77)
  • January 2020 (86)
  • December 2019 (82)
  • November 2019 (74)
  • October 2019 (89)
  • September 2019 (80)
  • August 2019 (91)
  • July 2019 (95)
  • June 2019 (88)
  • May 2019 (91)
  • April 2019 (79)
  • March 2019 (78)
  • February 2019 (71)
  • January 2019 (69)
  • December 2018 (79)
  • November 2018 (71)
  • October 2018 (78)
  • September 2018 (76)
  • August 2018 (78)
  • July 2018 (76)
  • June 2018 (77)
  • May 2018 (71)
  • April 2018 (67)
  • March 2018 (73)
  • February 2018 (67)
  • January 2018 (83)
  • December 2017 (94)
  • November 2017 (73)
  • October 2017 (86)
  • September 2017 (92)
  • August 2017 (69)
  • July 2017 (81)
  • June 2017 (76)
  • May 2017 (90)
  • April 2017 (76)
  • March 2017 (79)
  • February 2017 (65)
  • January 2017 (76)
  • December 2016 (75)
  • November 2016 (68)
  • October 2016 (76)
  • September 2016 (78)
  • August 2016 (70)
  • July 2016 (74)
  • June 2016 (66)
  • May 2016 (71)
  • April 2016 (67)
  • March 2016 (71)
  • February 2016 (68)
  • January 2016 (90)
  • December 2015 (96)
  • November 2015 (103)
  • October 2015 (119)
  • September 2015 (115)
  • August 2015 (117)
  • July 2015 (117)
  • June 2015 (105)
  • May 2015 (111)
  • April 2015 (119)
  • March 2015 (69)
  • February 2015 (54)
  • January 2015 (39)

Tags

APFS Apple Apple silicon backup Big Sur Blake Bonnard bug Catalina Consolation Console Corinth Delacroix Disk Utility Doré El Capitan extended attributes Finder firmware Gatekeeper Gérôme High Sierra history of painting iCloud Impressionism landscape LockRattler log M1 Mac Mac history macOS macOS 10.12 macOS 10.13 macOS 10.14 macOS 10.15 macOS 11 macOS 12 macOS 13 macOS 14 macOS 15 malware Metamorphoses Mojave Monet Monterey Moreau myth narrative OS X Ovid painting performance Pissarro Poussin privacy Renoir riddle Rubens Sargent security Sierra SilentKnight Sonoma SSD Swift Time Machine Tintoretto Turner update upgrade Ventura xattr Xcode XProtect

Statistics

  • 21,053,718 hits
Blog at WordPress.com.
Footer navigation
  • Free Software Menu
  • About & Contact
  • Macs
  • Painting
  • Downloads
  • Mac problem-solving
  • Extended attributes (xattrs)
  • Painting topics
  • SilentKnight, Skint, SystHist, silnite, LockRattler & Scrub
  • DelightEd & Podofyllin
  • xattred, SpotTest, Spotcord, Metamer & xattr tools
  • 32-bitCheck & ArchiChect
  • XProCheck, T2M2, LogUI, Ulbow, blowhole and log utilities
  • Cirrus & Bailiff
  • Precize, Alifix, UTIutility, Sparsity, alisma, Taccy, Signet
  • Versatility & Revisionist
  • Text Utilities: Textovert, Nalaprop, Dystextia and others
  • PDF
  • Keychains & Permissions
  • Updates
  • Spundle, Cormorant, Stibium, DropSum, Dintch, Fintch and cintch
  • Long Reads
  • Mac Troubleshooting Summary
  • M-series Macs
  • Mints: a multifunction utility
  • VisualLookUpTest
  • Virtualisation on Apple silicon
  • System Updates
  • Saturday Mac Riddles
  • Last Week on My Mac
  • sysctl information
Secondary navigation
  • Search

Post navigation

Reading Visual Art: 235 Fish B
Saturday Mac riddles 334

Begin typing your search above and press return to search. Press Esc to cancel.

  • Comment
  • Reblog
  • Subscribe Subscribed
    • The Eclectic Light Company
    • Join 8,887 other subscribers
    • Already have a WordPress.com account? Log in now.
    • The Eclectic Light Company
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Copy shortlink
    • Report this content
    • View post in Reader
    • Manage subscriptions
    • Collapse this bar
%d