MacOS – force finder to open without loading previous files

crashfindermacos

Finder crashed recently and I had to force quit it. Problem is that now when I open something with it, all of the files that it had open previously (including the one that caused the crash) try and open, and it crashes again. Is there a way to force Finder to open (one time only) as a clean slate?

Best Answer

Try deleting the savedState directory:

rm -r ~/Library/Saved\ Application\ State/com.apple.finder.savedState/

When I tried running killall -kill Finder, that worked, but open -Fa Finder or command-clicking Finder's Dock icon didn't.

You could also try to:

  • Disable ~/Library/Preferences/com.apple.Finder.plist by temporarily moving it somewhere else.
  • Cause a kernel panic with sudo dtrace -w -n 'BEGIN{panic();}'. There is normally an option to disable restoring state after kernel panics.
  • Temporarily unload the launchd agent with launchctl unload /System/Library/LaunchAgents/com.apple.Finder.plist. There is normally a dialog about restoring state after crashes, but maybe it's not shown if the program is opened by launchd.