What is the .plist.lockfile introduced in Lion? [duplicate]

Apple supplies a Core Foundation Preference Services API to developers that makes it easy for them to manage preferences. Apple uses the same API and these lock files help the system know what programs are writing to the files and it helps the system notify the running program when a setting gets changed.

The system will keep track of a file that's open even if you trash and delete it, but it's probably best to leave these alone (like most of ~/Library) as there's no undo for things that are stored there - they are there to support the "undo" of the rest of the system.


Lockfiles are used to make sure only one app interacts with a preference file at once. The idea is an app opens the lockfile in an exclusive mode while it opens the plist.

Source:

  • Lockfiles and other plist file subtypes in OS X Lion