Skip to content

Instantly share code, notes, and snippets.

@nhelfer
Forked from drblue/fix_onedrive.sh
Created August 11, 2020 15:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nhelfer/a2da319ac33c4878ab32ea307d01679b to your computer and use it in GitHub Desktop.
Save nhelfer/a2da319ac33c4878ab32ea307d01679b to your computer and use it in GitHub Desktop.
Fix OneDrive for Mac CPU usage
#!/bin/bash
## Fix OneDrive for Mac CPU usage
##
## Seems this is still a problem 5 years later after I created this little gist.
## I have long since stopped using OneDrive (luckily), but according to
## comments below, I have added the new path for OfficeFileCache for macOS
## Mojave (10.14) and Catalina (10.15).
## Run this on macOS Mojave (10.14) and Catalina (10.15)
find ~/Library/Containers/ -type d -name OfficeFileCache -exec rm -r {} +
## Run this if you're on pre-Mojave (< 10.14)
find ~/Library/Group\ Containers/ -type d -name OfficeFileCache -exec rm -r {} +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment