Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

macstatic

macrumors 68020
Original poster
Oct 21, 2005
2,025
165
Norway
What's the correct way to fully reset the MacOS Calendar app?

The reason I ask is because I've apparently messed up Calendar on one of my computers (it's fine on another Mac) and now it won't sync properly with my iOS devices.
What I want to do is start with a completely empty Calendar app on that Mac, then sync it up with my iPad so it gets updated with all my calendars there. I assume I can delete some files in order to start from scratch, but which ones?
I'm on MacOS 10.13.6 (High Sierra).
 
If you turn off calendar synch in your iCloud settings, then whatever you do with your Mac calendar will be independent of your other devices. You can delete some or all of your calendars and then start over and restore the synch with your other devices. If you only have one Mac calendar, you can add a second calendar which as a new calendar will be empty of all content. Delete the old calendar, which leaves you with the new (empty) calendar. Then restore the synch with iCloud.
 
I don't sync with iCloud but use a USB to Lightning cable between the two devices and sync with iTunes on the Mac.
But your comment gave me some thought that perhaps having calendar sync in iTunes "locks" the Mac Calendar app's contents so I'm not free to properly delete stuff. I'll give that a go.

Oh, I also came across this article about deleting its cache. I suppose that's what's preventing any changes from happening, or perhaps in combination with the above issue.
 
Here is a simple solution: install AppCleaner https://freemacsoft.net/appcleaner/ drag the Calendar app into it, uncheck the Calendar app (as it can not be deleted) and delete everything else.
Wow! I've used AppCleaner for years, but never thought about this.
I looked into it (dragging the Calender app into it, but not yet deleting the files) and the first thing I found out is that I have to to is go to its preferences and disable "Protect default OSX apps" (or else no files will be shown at all).
Screen Shot 2022-05-14 at 10.08.57.png

Here are the files that came up after dragging the Calendar app over to AppCleaner. I've highlighted in red the two files I obviously should keep:
Screen Shot 2022-05-14 at 10.08.33.png

The big question now is if I press the "Remove" button, will irreversable damage occur, or will all those files be rebuilt from scratch again?
 
Deleting
~/Library/Containers/com.apple.iCal
~/Library/Containers/com.apple.iCal.CalendarNC
~/Library/Preferences/com.apple.iCal.plist
~/Library/Preferences/com.apple.iCalExternalSync.plist
should reset the user settings and the files should be recreated when Calendar is opened again.
 
I tried the above but for some reason the calendars got rebuilt. Maybe there's some involvement with the cache or previous sync session. In addition to the above I also deleted some other files, but with inconsistent results:

LIBRARY folder
~/Library/Calendars

CONTAINERS folder
~/Library/Containers/com.apple.CalendarAgent
~/Library/Containers/com.apple.CalendarNotification.CalNCService
~/Library/Containers/com.apple.iCal
~/Library/Containers/com.apple.iCal.CalendarNC

PREFERENCES folder
~/Library/Preferences/com.apple.iCalExternalSync.plist
~/Library/Preferences/com.apple.iCal.plist

I also tried rebooting or logging out after deleting the above, but again with inconsistent results. I really can't make sense of what's happening.
A couple of times I did get this window though, confirming something was done right, but I haven't been able consistently reproduce this result:
Screen Shot 2022-05-14 at 18.42.48.png


Regardless, I've successfully synced that Mac with one of my iOS devices, so now both computers and all my iOS devices should be in sync ?

There are some strange quirks to keep in mind when syncing, like the fact that when you attach an iOS device to the Mac (USB cable) and open up iTunes, then go to the Calendar/Contacts sync section ("Info")...
Screen Shot 2022-05-18 at 09.32.09.png


.... it seems like the previous sync is displayed first (i.e. it doesn't necessarily reflect the calendar names you currently have in the Mac Calendar app), but will be updated when you actually perform the sync.
But..... let's say you've had some calendars before, but have since been deleted and you do a sync, those deleted calendars will also be synced, in addition to the current ones.

The solution?
Instead of choosing to sync "All calendars" (even though you actually want to sync all your calendars), click on "Selected calendars" and manually enable (turn on) sync for only the calendars shown which are applicable and not the ones also included from the previous sync (which are actually no longer present in the Calendar app). This should allow a proper sync.
From the next sync session and onwards you should be able to use "All calendars" as the calendars now shown in the list are correct according to what your Mac Calendar app has.

Screen Shot 2022-05-18 at 09.31.49.png
 
Last edited:
SOLVED for me at least.
I tried using AppCleaner to delete the various folders listed above.
However, many of the listed folders did not exist; maybe because I am running macOS 13.0.1 Ventura, as it may have changed some locations.
My problem was not with seeing calendars or items, syncing, etc.; I was getting no or very few results when searching. I thought it might be cache or index files, but was not sure.
Here's what I did to reset my calendar:
  1. Quit Calendar.
  2. Drag Calendar.app to AppCleaner
  3. Use AppCleaner to Trash the folders listed in the answers above -- at least those that I could find in the list.
  4. In Finder, go to ~Library\Calendars and delete several files:
    1. Calendar.sqlitedb
    2. Calendar.sqlitedb-shm
    3. Calendar.sqlitedb-wal
  5. Restart Calendar.
  6. Examine Calendar>Settings to ensure it is set to what it was before the deletions.
  7. Wait for iCloud to sync.
Thanks to previous answers, and good luck!
 
It's not working for me, because AppCleaner immediately reacts with "Cannot remove system apps" and no single item appears in AppCleaner.
My system is Ventura (13.3) btw.
 
In Ventura, from Terminal:
Code:
rm -rf ~/Library/Calendars
rm -rf ~/Library/Containers/com.apple.iCal*
rm -rf ~/Library/Application\ Scripts/com.apple.iCal*
rm ~/Library/Preferences/com.apple.iCal*
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.