70

When trying to clean up their hard disk, some users discover ~/Library/Caches/com.apple.bird is pretty big, sometimes in the order of many gigabytes. What is it?

hectorpal
  • 861
  • 1
  • 8
  • 12

2 Answers2

56

Bird is part of iCloud and the files in the folder might be owned by any app using iCloud. I wrote a simple Python script to try and find out who owns the files in the directory:

$ python blame-bird.py 
4R6749AYRE.com.pixelmatorteam.pixelmator            0.00MB
com.apple.shoebox                                   0.00MB
com.apple.TextInput                                 0.00MB
iCloud.com.apple.iBooks                             0.00MB
57T9237FN3.net.whatsapp.WhatsApp                 6904.66MB

Accounted for: 6904MB.  Still unaccounted: 1879MB

So on my Mac WhatsApp is the biggest culprit. I filed a bug report with them (although I am not sure if it's really their fault).

bas
  • 660
  • 3
    Awesome answer, awesome script. Whatsapp was also the issue for me: 57T9237FN3.net.whatsapp.WhatsApp 5164.78MB – LordParsley Aug 15 '16 at 13:39
  • 1
    I have WhatsApp with more than 17 GB! 57T9237FN3.net.whatsapp.WhatsApp 17556.63MB – lukas Aug 16 '16 at 21:33
  • 2
    @bas: Great script! It's WhatsApp for me too ... how do you fix it? Just delete the com.apple.com folder? – DeepSpace101 Aug 31 '16 at 14:31
  • 1
    A lot of people just delete all the files in the folder, but I'm not certain that is completely safe. You can file a bug report with WhatsApp. If enough people do that, then hopefully they will fix the bug which causes this. – bas Aug 31 '16 at 14:36
  • 3
    20GB here :/ I read it's safe to delete and disabling Whatsapp iCloud backup prevents it to grow again. – Roberto Nov 06 '16 at 05:16
  • there are all the backup files of whatsapp? – muescha Jan 24 '17 at 01:22
  • would be nice to know how to clean up the files safe without delete my backup – muescha Jan 24 '17 at 01:22
  • So my relatives whatsapp group, filled with garbage videos, is to blame! – Sridhar Sarnobat Nov 13 '17 at 03:59
  • 58GB for whatsapp, I fail to understand why it's so big... anyway thanks for the script – Pirkka Esko Feb 02 '18 at 09:14
  • 2
    Either something's wrong with my system, or it appears this python script is no longer working on Big Sur (dev beta 10): Accounted for: 0MB. Still unaccounted: 0MB. Al the while my bird folder is over 100 GB's in size... – TD540 Oct 18 '20 at 07:00
  • They will never attend their bug at WhatsApp, because it's all "free" and in Windows it performs even worse... Anyway, ANYTHING within the folder named "Caches" should (by theory of course) be safe to discard. That's the whole point (and definition) of Caches. They're not the "Real" persistence store, but rather "temporary files organised such that they improve program speedy access to data". Caches by definition cannot hold "temporary files" on their way somewhere, that if removed, a user's action won't be accomplished. – Motti Shneor Dec 20 '20 at 06:28
  • 2
    That's what I got in 11.6.2 when running the script

    Traceback (most recent call last): File "blame-bird.py", line 85, in sys.exit(main()) File "blame-bird.py", line 29, in main '~/Library/Application Support/CloudDocs/session/db/client.db')) sqlite3.DatabaseError: authorization denied

    – StuFF mc Dec 27 '21 at 10:34
45

'Bird' is part of the iCloud structure. You would have a large cache if there are pending documents to upload or process.

Over time, the com.apple.bird cache is generally kept cleaner than you're thinking. Mine is 400 KB [that's K, not even M]

You can diagnose this with brctl - which has a diagnose command and a log command. Unless you are sure you have a bug in the cache - I wouldn't delete the files as they might cause you at best - another upload of the original content and at worst - cause errors or data loss of iCloud backed documents.

With that large a cache you should be able to dump and then monitor whatever categories/classes of data have the most size.

brctl dump

It's exceptionally verbose and you might not want to spend time learning what it does - but the data is quite helpful in determining what's actually happening and gives you an option before reaching out to AppleCare or another support tech in cases where you don't see the cache clearing itself over time.

Tetsujin
  • 115,663
  • 15
    Mine is 39gb! What's the point of iCloud if it stores that much locally, haha! –  Feb 08 '16 at 20:15
  • 3
    I've made a substantial edit - with iCloud photo libraries of 150 GB and a fast network - I've seen a cache like that build up and then empty over several days. I wouldn't advice just deleting this cache as the code might re-sync even more data when it builds up the cache of work upon realizing the rug has been pulled out from under the cloud data sync. – bmike Feb 08 '16 at 20:47
  • Well, I emptied mine and it grew back to 20gb or so. I only update documents, sometimes overwriting them after few minutes. It's like the cache is not ready for these cases. Too bad. 20Gb is a lot for a ssd disk. – hectorpal Feb 26 '16 at 18:48
  • I have 250gigs :o – Dion May 19 '16 at 13:17
  • 2
    Mine was > 40gb. I fixed this by going to System Preferences > iCloud > unchecking the box marked iCloud Drive, waiting for it to turn off, then checking it again. (Source) – Lane Rettig Sep 27 '17 at 17:31
  • I'd say ANYTHING within a folder named "Caches" should (in theory of course) be safe to discard. That's the whole point (and definition) of Caches. They're not the "Real" persistence store, but rather "temporary files organised such to improve program speedy access to data". Caches by definition cannot hold "temporary files" on their way somewhere, only their "reorganised reflection" built to speed up things. – Motti Shneor Dec 20 '20 at 06:34
  • On my Mac (whose iCloud synchronization is completely broken) 'brctl' creates a 700MB compressed .tgz !!!! should any sane person be ever able to understand what goes on in hundreds of megabytes of logs and disgnosis files? how? where to start? that's not a tool for users (and I'm a 35 year Mac developer), but rather for Apple engineers. Not very helpful. – Motti Shneor Dec 20 '20 at 06:36