Review plist Files

Jump to: navigation, search


The command line tool plutil will parse any selected files and validate them as well formed XML. Anyway, the point here is that corrupted preference files are likely to fail this validity test.

This shell script, which parses the two most common places where preference plist files are found, returns the errors if any are found. One can then decide to trash the files or inspect them.

The file can be placed any where but by convention I'd place it in /usr/local/bin .


  • Using your favorite text editor, create the file by doing a copy and paste.
  • Change permissions on the file to allow execution.
    chmod 755 
  • Move file to a reasonable location.
    sudo mv /usr/local/bin/
  • Execute as a sudo command
  • Review errors

bash Command File

# Check that we are being run as root
if [ $USER != "root" ]; then
  echo "Must be root---try sudo."
  exit 1
find /Library/Preferences -name "*.plist" -print0 | xargs -0 /usr/bin/plutil -lint -s
find /Users -name "*.plist" -print0 | xargs -0 /usr/bin/plutil -lint -s