Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

thousands of files in /Library/Keychains

On a Mac mini I have the problem that I can't access the /Library/Keychains folder any more as finder it is trying to update the folder view forever. In the terminal window even a ls takes forever (+8 hours) with no result (just blinking cursor). A CCC clone could not be finished successfully, even after +10 hours it is just copying files like login.keychain_HX98DHT (don't remember exactly, but there are thousands if not millions of these).

Volume and Disk repair have shown no issues - all green.


Here are the questions:


  • What could have been causing this?
  • What can I do to resolve this?
  • Is there a way to delete this folder w/o having to enter it?
  • Is it safe to remove the keychain folder completely? (no important passwords have been stored there so we do not rely on any info in there)


Thanks to all in advance!

Mac mini, Mac OS X (10.7.5)

Posted on Dec 1, 2012 9:56 AM

Reply
Question marked as Best reply

Posted on Dec 1, 2012 11:47 AM

See if the Disk is issuing any S.M.A.R.T errors in Disk Utility...


http://support.apple.com/kb/PH7029


I've never tried removing the whole folder, yet it can be done.


In 10.4.11, I only have 2 files in my /Library/Keychains folder...


.fixed

System.keychain


But 4 in /System/Library/Keychains/


And 4 in /Users/MyUserName/Library/Keychains/


Be very careful with these commands, but in Terminal do...


man rm


And...


man rmdir


Likely you'll need to use sudo with it.

19 replies

Dec 3, 2012 12:47 PM in response to BDAqua

FYI, "globbing" (using the * character as a wildcard in filenames) is a kind of expansion. The shell rewrites the command before executing it, replacing the pattern with all the explicit filenames that match it. If there are too many matches, as in this case, the command will fail. You have to step through the arguments one at a time.

Dec 4, 2012 3:20 AM in response to kingsx

Dear all,


Thanks for helping here on this issue, this is highly appreciated!


Now what I did (say, "had to do" because the user wanted to work again) was doing a CCC image on an external HDD w/o the affected user's /Library/Keychains folder. I booted from this one and voilà - all good. I then removed the volume on the Mac HDD and recreated it. Thankfully CCC nowadays is able to restore the recovery partition, too.

So in the end I just re-cloned the disk w/o the Keychains folder. After Login the folder was there and it contained just the login file.


Might this be of some help to someone... 🙂

Oct 7, 2013 7:15 PM in response to kingsx

The permissions fix worked for me. I had over 60GB of keychain files that got added within the last few days. I had changed permissions on my home folder a few days back to try and fix a permissions setting with Photoshop. It opened everything a bit too much, I guess. Now all is well and Photoshop still works, still saves files and preferences.

thousands of files in /Library/Keychains

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.