Skip to content

Instantly share code, notes, and snippets.

@jhochwald
Created March 31, 2015 08:18
Show Gist options
  • Save jhochwald/71aab5fe0baaccc6d720 to your computer and use it in GitHub Desktop.
Save jhochwald/71aab5fe0baaccc6d720 to your computer and use it in GitHub Desktop.
OneDrive for Business Mac (preview): A problem occurred while accessing the Office Document Cache. Do you want to repair this problem?
#!/bin/bash
IFS=$'\n'
# Kill all running instances of OneDrive Business
killall -9 "OneDrive for Business" 2>/dev/null
killall -9 "OneDrive for Business" 2>/dev/null
# Find all stale caches
for i in `find ~/Library -name OfficeFileCache 2>/dev/null`;
do echo $i;
rm -Rf "$i";
done
# Restart OneDrive Business
/Applications/OneDrive\ for\ Business.app/Contents/MacOS/OneDrive\ for\ Business &
# Make a clean exit
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment