Apple Event: May 7th at 7 am PT

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

How can I remove 300 groups from my iCloud Contacts?

My OS X Address Book started out with about 10 groups, but now iCloud.com has about 300 groups.


The replication arose because of a bug in how iCloud handles a mixture of Address Book Cards with both OS X and Windows line terminated Notes (LF vs. CRLF - it helps if you once used a typewriter).


I figured out how to convert Address Book to all LF terminated line feeds and I was able to get iCloud.com working on a different account, but my core account is stuck with 300 groups (some replicated 50 times).


I know how to delete all Cards/Contacts in iCloud.com Contacts, but, unfortunately that doesn't remove Groups. (Groups have an interesting behavior in iCloud, almost as though Apple has a special plan for them.)


I can delete Groups one at a time on iCloud.com, but that's tedious. Unfortunately deleting them on Address Book, and trusting in sync to clear up iCloud.com, is equally tedious.


Has anyone heard of a way to delete all Groups on iCloud or Address Book 6? Perhaps an AppleScript?


Has anyone heard of Apple resetting a corrupt iCloud account to clear out bad data? (I have a clean version of Address Book I can use to restart -- that, by the way, is harder than you'd think. Again because Groups are special).


Advice appreciated. If I get some free time I might take may laptop by the Genius bar and see what they say...

Posted on Jul 7, 2012 7:41 PM

Reply
21 replies

Aug 31, 2013 12:35 AM in response to Corsica76

Copy and paste the script at bottom of this message. From memory I think the most you can delete at a time was 50 so every time you run the script it will delete 50 of the groups. It isn't very fast but it will speed up as you gradually delete the groups. I hope this helps




tell application "Contacts"

repeat 50 times

set theGroup to group "groupesanstitre"


deletetheGroup

end repeat

save

end tell

Aug 31, 2013 9:55 AM in response to Corsica76

Corsica, ignore the missing value message, just keep running the script. Be SURE you put the name of the groups you are deleting in the third line of the script below - the part in "--------" should be YOUR group name. You can run the script using hundreds, not just 50 times. It took me all evening to run this over and over again because I had well over 10,000 empty groups, but it DOES work!


tell application "Contacts"

repeat 50 times

set theGroup to group "MyGroupName"


deletetheGroup

end repeat

save

end tell

How can I remove 300 groups from my iCloud Contacts?

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