This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

I cannot delete Firefox. It gives me the error "libnspr4.dylib is in use" on mac os x 10.7. How do I remove Firefox?

  • 4 replies
  • 221 have this problem
  • 2 views
  • Last reply by uname

more options

The file is "damaged or incomplete" and won't open.

The file is "damaged or incomplete" and won't open.

Chosen solution

The process restarted immediately after killing it, so the above solutions didn't work for me. Instead, I did the following:

  • Search for 'vpnagentd' in Spotlight
  • Select 'Show All in Finder'
  • Rename vpnagentd to something else (I chose vpnagentd.stop)
  • Now stop vpnagentd in Activity monitor (it shouldn't respawn again)
  • Continue with FF installation
  • Restore the vpnagentd filename
  • Success
Read this answer in context 👍 23

All Replies (4)

more options

I had this and discovered it was Cisco AnyConnect VPN client keeping the file open. Really strange, and its name in the process table was Cisco\x20, could you look more like a trojan Cisco?

Anyways, if it so happens that you don't use this Cisco VPN client, you can find out yourself by executing some commands, this is not for the faint of heart and I'm not a teacher.

First `find /Applications/Firefox.app -name "libnspr4.dylib" -type f -print` showed me that the library is in /Applications/Firefox.app//Contents/MacOS/libnspr4.dylib.

Then an `ls -i /Applications/Firefox.app/Contents/MacOS/libnspr4.dylib |cut -d' ' -f1` will give me the inode number of the file which is unique. Then `lsof | grep inodenumber-you-found` will reveal the application holding it open. I also learned that on Mac OS lsof lists the filename so a lsof | grep libnspr would have been faster but hey! =D

Also the process vpnagentd could be holding it, run `sudo launchctl remove com.cisco.anyconnect.vpnagentd` and the service will be removed completely. I tried stopping it and couldn't, neither remove nor unload could stop the actual process, just restart it. =D Crazy Cisco!

Modified by swehack

more options

I simply opened a terminal window, typed `ps ax | grep vpn` and the just ran `sudo kill 220` where 220 was the process # that ran the Cisco AnyConnect vpn-process in the background. Then I was able to install Firefox 7.

And it also would have been possible to delete any Firefox installation if that was the purpose.

Modified by gflygt

more options

I received the same "libnspr4.dylib is in use" error when trying up upgrade (replace old version with new version). Thanks to you both @gflygt and @swehack, I was able to quickly kill the process with Activity Monitor (and without Terminal).

For those less tech savvy folks reading this who are wary of Terminal, try this easy fix: 1. Open Activity Monitor from Applications/Utilities, then 2. choose "CPU" on the bottom, choose to view "All Processes" on the top right, and search for "vpn". 3. The file in question, "vpnagentd" will come up, click on it to select it, and press the big red stop button on the upper-left to "quit process".

This should kill the process and allow you to uninstall/upgrade FireFox.

more options

Chosen Solution

The process restarted immediately after killing it, so the above solutions didn't work for me. Instead, I did the following:

  • Search for 'vpnagentd' in Spotlight
  • Select 'Show All in Finder'
  • Rename vpnagentd to something else (I chose vpnagentd.stop)
  • Now stop vpnagentd in Activity monitor (it shouldn't respawn again)
  • Continue with FF installation
  • Restore the vpnagentd filename
  • Success