Keeps crashing every 5 minutes!

This is what worked for me - thanks @iain.nb for sharing.

I suspect it might be caused if you already have VS Code installed with extensions. The script shared completely removes both VS Code and Cursor, enabling you to install a clean version of Cursor without conflicts.

Load up terminal (ctrl + space and type terminal - hit enter)

In terminal, type:
sudo nano reset-cursor.sh

It’ll ask you for your password - enter it and hit enter.

Paste the following code in the text editor that loads:

#!/bin/bash

echo "Cleaning up VS Code and Cursor..."

# Close VS Code and Cursor if they're running
killall "Code" 2>/dev/null
killall "Cursor" 2>/dev/null

# Remove the applications
rm -rf "/Applications/Visual Studio Code.app"
rm -rf "/Applications/Cursor.app"

# Remove VS Code user data
rm -rf ~/Library/Application\ Support/Code
rm -rf ~/Library/Saved\ Application\ State/com.microsoft.VSCode.savedState
rm -rf ~/.vscode
rm -rf ~/Library/Caches/com.microsoft.VSCode
rm -rf ~/Library/Preferences/com.microsoft.VSCode.plist

# Remove Cursor user data
rm -rf ~/Library/Application\ Support/Cursor
rm -rf ~/Library/Saved\ Application\ State/com.cursor.Cursor.savedState
rm -rf ~/.cursor
rm -rf ~/Library/Caches/com.cursor.Cursor
rm -rf ~/Library/Preferences/com.cursor.Cursor.plist

echo "Cleanup complete! VS Code and Cursor have been fully removed."
  • Press ctrl + o to save
  • Press enter to confirm
  • Press ctrl + x to close

Then type:
sudo bash reset-cursor.sh

And it will run the script to completely remove both programs.

Then download the latest version of Cursor and install it.

Good luck!

3 Likes