This guide provides step-by-step instructions to completely remove cursor-cli and all associated files from your macOS system.
When you run curl https://cursor.com/install -fsS | bash, it installs:
- Main installation:
~/.local/share/cursor-agent/(at my system its around ~136MB) - Symlink:
~/.local/bin/cursor-agent - PATH modification: Adds
~/.local/binto your shell's PATH in~/.zshrc
# Remove the symlink
rm -f ~/.local/bin/cursor-agent
# Remove the entire cursor-agent installation directory
rm -rf ~/.local/share/cursor-agentRemove the PATH modification from your shell configuration file:
# For zsh users (most common on macOS)
sed -i '' '/export PATH=.*\.local\/bin.*PATH/d' ~/.zshrc
# For bash users
sed -i '' '/export PATH=.*\.local\/bin.*PATH/d' ~/.bashrcAlternatively, you can manually edit the file and remove this line:
export PATH="$HOME/.local/bin:$PATH"# Check if ~/.local/bin is empty and remove if so
if [ -d ~/.local/bin ] && [ -z "$(ls -A ~/.local/bin)" ]; then
rmdir ~/.local/bin
echo "Removed empty ~/.local/bin directory"
fi
# Check if ~/.local is empty and remove if so
if [ -d ~/.local ] && [ -z "$(ls -A ~/.local)" ]; then
rmdir ~/.local
echo "Removed empty ~/.local directory"
fi# Remove Cursor editor application data
rm -rf ~/Library/Application\ Support/Cursor
# Remove Cursor editor caches (if they exist)
rm -rf ~/Library/Caches/com.todesktop.230313mzl4w4u92.ShipIt
After making these changes, restart your terminal or run:
# Reload your shell configuration
source ~/.zshrc # or source ~/.bashrc for bash usersVerify that cursor-cli has been completely removed:
# This should return "command not found"
cursor-agent --version
# Check that the files are gone
ls ~/.local/share/cursor-agent # Should show "No such file or directory"
ls ~/.local/bin/cursor-agent # Should show "No such file or directory"
# Verify PATH cleanup
echo $PATH | grep -o '\.local/bin' # Should return nothing~/.local/share/cursor-agent/- Main installation directory~/.local/bin/cursor-agent- Symlink to the binary- PATH modification in
~/.zshrc- Shell configuration change - Optional:
~/Library/Application Support/Cursor/- Cursor editor data
If you find any problems or have any feedback to the progress, feel free to make a PR or Issue.