Apple in the Enterprise

Restore default system applications on OS X after deletion or corruption

Takeaway: Jesus Vigo offers four solutions to restore system applications on OS X systems.

I was recently called out by a business client to resolve a perplexing issue. The iMacs they’ve been using had reached their end of life and they were getting ready to decommission the desktops in lieu of purchasing new equipment. Each end-user was responsible for backing up his or her data prior to the hard drives being wiped in accordance with the company’s data security policy. Now, while most users are savvy enough to perform these steps themselves, a few of the desktops developed a unique issue — certain applications, such as System Preferences.app and Contacts.app stopped working or went missing altogether.

In the case of System Preferences.app, we found the application had been deleted by the end-user while backing up their files, feeling that the app itself contained their customized settings and they did not wish for this to fall into the wrong hands. While the thought was sound, unfortunately the execution was not, as certain system applications interface directly with the local settings files used by OS X. Without System Preferences.app, typically found in the Applications folder, seemingly simple tasks such as changing your screen saver or removing a local user’s home folder becomes impossible to complete without some extensive command line wizardry.

With the cause of the problem identified, I moved onto the fun part of restoring the critical applications so the IT department could complete their decommissioning of the equipment and perform the swap out of the new equipment in a timely manner. Luckily, there are several methods that can be used to restore these missing applications. Also, I found them flexible enough to meet the requirements of different scenarios in which you may encounter this type of issue.

A. Restoring from file system-level backups

This is by far the simplest method:

  1. Simply mount and navigate the directory structure of your most recent backup of choice (TIme Machine, Carbon Copy Cloner, Super Duper!, etc).
  2. Go to the /Applications folder and copy the AppName.app from the backup to the local Applications folder on the computer.
  3. Execute the newly restored app to double-check it launches properly.

B. Copy from another Mac using the same version of OS X

Similar to the backup restore, this step involves using a USB drive or network connection to copy the missing application from another computer that is working properly. One thing to keep in mind when using this method is to copy the app from the same version of OS X as you will be restoring to. In other words, Lion (10.7)>Lion (10.7); Mountain Lion (10.8)>Mountain Lion (10.8.2) but don’t try to mix & match different OS versions or the Finder will warn you with an error message. Lastly, FTP or SSH also works well when transferring over the network in the event the nearest machine is across the WAN.

C. Using Pacifist and OS X Installation Media (or DMG)

Pacifist (shareware) allows you to natively modify Apple’s default settings files or .plist files as they’re referred to. While the exact use of .plist files is beyond the scope of this article, Pacifist (www.charlessoft.com) as of this writing is at 3.0.10 and currently supports from 10.4.11 to 10.8.2; however, there are older versions available in the event that you’re using an older cat version. While Pacifist can be a powerful tool in itself, for our purposes, a missing app can be reinstalled in just a few clicks.

  1. Insert the Mac OS X Media or mount the DMG.
  2. Download and install Pacifist, and then execute the application.
  3. Upon execution, Pacifist will prompt with a shareware warning. Clicking “not yet” will bypass this warning and allow you to access the full application.
  4. In the main app, click on “Open Package” and locate the installation media from the window that opens.
  5. Once selected, Pacifist will search the media and locate the install packages that make up the entire install. Highlight the root and search for the application you wish to restore from the search box.
  6. Once located, select the application and click the Install button. You’ll be prompted to select a restore location or choose the default path.
  7. Depending on the size of the app, this process may take several minutes to complete app reinstallation.

D. OS X Installation Media/Partition

If none of the steps above have worked out, perhaps the level of corruption leading to the application’s missing status is too severe for a simple replace to correct. In these rare occasions, the best solution may just be a system installation using the DVD or install partition found on the more recent versions of OS X. This does not mean that the hard drive needs to be formatted, solely that the OS may need to be installed anew in order to fully restore all missing applications and preferences and correct other file system corruptions. This is the most time consuming solution and so that is why it was left as a last ditch effort to recover the files. Please note, unless explicitly input via Disk Utility, this process will not delete any non-system data. Meaning personal files located within the end-users home folders will remain untouched.

As always, it is advised to perform a full backup prior to any system-level change. In a worst-case scenario, the OS can always be reinstalled, but once data is gone, it’s almost irrevocably gone. Like the famous engineering term, measure twice, cut once. Lastly, don’t forget that the OS version level on Installation Media does not get updated over time like the OS does so it’s good practice to have the latest ComboFixUpdate for your OS version to patch the newly restored files, as needed. Rerunning the update will bring all the applications up-to-date and running properly along with the rest of the system.

Get IT Tips, news, and reviews delivered directly to your inbox by subscribing to TechRepublic’s free newsletters.

Jesus Vigo

About Jesus Vigo

Jesus Vigo is a Network Administrator by day and owner of Mac|Jesus, LLC, specializing in Mac and Windows integration and providing solutions for the SMB sector.

Jesus Vigo

Jesus Vigo
Jesus Vigo is a Network Administrator by day and owner of Mac|Jesus, LLC, specializing in Mac and Windows integration and providing solutions to small- and medium-size businesses. He brings 15 years of experience and multiple certifications from several vendors, including Apple and CompTIA.