Deleted Mac system files, how to fix?
It is widely known that system files ans folders are crucial for a device to run smoothly. They should not be modified or deleted without a good reason. However, when users experience issues with their system, they often turn to various online sources for information on how to fix it and these sources sometimes suggest replacing or erasing certain elements from system folders. As a result, important system files can be deleted by mistake, which can lead to computer malfunctions. Specifically for this type of situations, modern Mac operating systems have a hidden recovery partition, which is the same as having an installation CD or DVD, because it stores system installation files.
If you decide to use this partition to reinstall your operating system, you will be able to not only fix your issues, but also keep your private data intact. Fortunately, the hard disk is not erased during the re-installation, so your personal files will not be affected. If, on the other hand, you have issues with the recovery partition itself, there is the “Internet recovery partition”, which is an alternative method to restore your system files. The partition is stored on Apple servers.
Here are the instructions on how to restore deleted system files using different methods:
Restore via Recovery Partition
As we have mentioned, restoring erased system files and folders using the Recovery Partition allows you to replace the missing system files and keep your personal data unaffected. First, you will have to turn off your computer, then turn it back on, and hold down the Command and R key at the same time until the macOS Utilities window appear. Here, you should select Reinstall macOS, click Continue to confirm all your actions, and agree to Apple’s term and conditions. In the next window, you will have to select the storage location by choosing the internal hard drive and clicking Install. The installation process will then begin. How long it takes will depend on the internal hard drive speed.
Restore via Internet Recovery mode
If, for some reason, you cannot use the recovery partition, your next option is Internet Recovery mode. First, you need to make sure that your device meets the minimum requirements for this mode. Here are the compatible systems:
- MacBook Pro (13-inch, 15-inch, 17-inch Early 2011)
- iMac (21.5-inch, 27-inch, Mid 2011)
- MacBook (13-inch, Mid 2010)
- MacBook Pro (13-inch, Mid 2010)
- Mac mini (Mid 2010)
- MacBook Pro (15-inch, 17-inch, Mid 2010)
- iMac (21.5-inch, 27-inch, Mid 2010)
- MacBook Air (11-inch, 13-inch, Late 2010)
Some earlier Apple versions may also use the Internet Recovery mode, so if your device is older than the ones mentioned above, you can check the Apple firmware update list.
As for other requirements, your network must use DHCP and WPA/WPA security methods. The following authentication methods are not compatible with Internet Recovery:
- Certificate-based authentication / 802.1x
- Captive Wi-Fi networks
In order to reinstall your system using Internet Recovery, you will need to change your configuration setting to a compatible one.
Once you are sure that your device meets the requirements, you can move on to reinstalling your system files. Keep in mind, however, that if you do not back up your data, you will lose it as after the reinstallation, your computer will only have the default software. That is why you need to make sure that you secure your files by creating backups using Time Machine or some other software.
If you have your files backed up, you can now begin the reinstallation process. Click the Apple logo in the menu and restart or shutdown your computer. During the rebooting of the system, you have to hold down Command, Option (Alt) and R keys. This will result in an animated globe appearing on your screen with the following message: “Starting Internet Recovery. This may take a while.”
The next step is to select a Wi-Fi network: click the drop-down menu and choose your network, confirm access with your password, and tap Return on the keyboard (or click the checkmark). Once you access the Internet, your device will start downloading a recovery system image from Apple servers.
Once the image is downloaded, you will see the macOS Utilities window on your screen. It will provide you with access to Restore from Time Machine Backup, Reinstall OS X, and other features. Starting here, you can follow the above given instructions on how to restore macOS via Recovery Partition or choose the Time Machine feature.
Restore via Terminal
If you cannot or do not wish to reinstall the whole OS, there are other methods to recover system files without losing your personal data. You can copy the missing or corrupted system files from a different device, if the OS versions of both systems are the same, using the Terminal feature.
First, you need to shut down the computer and then reboot it in the recover mode (hold down Command and R keys while the system is starting). When the macOS Utilities window shows up, click on Utilities, and select Terminal. Once you launch it, type df and press Return to execute. After that, you need to type in the following command in order to copy the /bin folder linked to the hard disk: cp -a/bin/Volumes/disk name (change ‘disk name’ to the name of the Mac disk). Once the task is finished, close the Terminal app and restart your computer. Please note that this method requires you to update your system afterwards.