Software⏱️ 3 min read📅 2026-06-11

How to Fix: Mac os X Error unloading plist

Error unloading plist file on MacOSX 10.8, unable to unload php-fpm process.

Quick Answer: The issue is caused by the 'LaunchOnlyOnce' key being set to true in the plist file, which prevents the process from being unloaded when launchctl is used with the '-w' option.

The 'Error unloading: net.php.php-fpm' error occurs when attempting to unload the PHP-FPM service using the `launchctl unload` command. This issue affects users who have installed PHP-FPM on their Mac OS X system and are trying to remove it.

This error can be frustrating, especially if you're not familiar with Launch Agents or the underlying system configuration. In this guide, we'll walk through the steps to troubleshoot and resolve this issue.

💡 Why You Are Getting This Error

  • The primary reason for this error is that the `net.php.php-fpm` service has a 'LaunchOnlyOnce' value set to true in its plist file. This means that the service will only be launched once, but not unloaded. When you try to unload the service using `launchctl unload`, it returns an error because it's already been launched.
  • Another possible cause is that the service is still running in the background and not being properly detected by Launch Agent. In this case, the 'KeepAlive' value might be set too high, preventing the service from being unloaded.

🛠️ Step-by-Step Verified Fixes

Checking and modifying plist file

  1. Step 1: Open the `net.php.php-fpm.plist` file in a text editor using the sudo command: `sudo nano /Library/LaunchAgents/net.php.php-fpm.plist`.
  2. Step 2: Locate the 'LaunchOnlyOnce' value and set it to false by changing the line to `LaunchOnlyOnce`.
  3. Step 3: Save and close the file. Then, try unloading the service using `launchctl unload -w /Library/LaunchAgents/net.php.php-fpm.plist`.
  4. Step 4: If you encounter any issues during this process, restart your system or try deleting the plist file and then reloading it with `launchctl load -w /Library/LaunchAgents/net.php.php-fpm.plist`.

Resetting Launch Agent configuration

  1. Step 1: Try resetting the Launch Agent configuration by running the following command: `sudo launchctl reset net.php.php-fpm`. This will remove any existing configuration and allow you to start fresh.
  2. Step 2: After resetting, try loading the service again using `launchctl load -w /Library/LaunchAgents/net.php.php-fpm.plist`.
  3. Step 3: If this method doesn't work, proceed with modifying the plist file as described in Method 1.

💡 Conclusion

To resolve the 'Error unloading: net.php.php-fpm' error on Mac OS X, you can try either modifying the plist file to set 'LaunchOnlyOnce' to false or resetting Launch Agent configuration. If these methods don't work, further troubleshooting may be necessary. Remember to always back up your system before making any changes to ensure data integrity.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions