Another way if you want to use the command prompt (since I am lazy), do where code
and delete them like this:
You can check which env variable paths take precedence by typing this in the command line (won’t work in PowerShell):
where code
My cursor path was in system variables while my vscode path was in user variables. It seems that system variables take precedence, so I fixed this by moving cursor path from system variables to user variables and making sure it came after the vscode path:
As has been stated by multiple responses here, deleting the code
entries doesn’t stick as they get re-added whenever Cursor updates (which is frequently)
The reason this issue persists is because of during initial Cursor install you chose the option of adding the command to PATH (which also adds code).
Changing PATH precedence or removing cursor entirely may also have issues. As Cursor keeps adding back its bin folder during update (may need confirmation)
Uninstalling and re-installing will also not work as you will not be asked to choose the PATH option.
Fixing the underlying issue
An option that does work is 1) uninstalling, 2) deleting all Cursor data folders, then 3) installing afresh, which allows you to change the Install option to not add it to PATH.
deleting cursor folders: after uninstall, delete these folders:
%USERPROFILE%\AppData\Local\Programs\cursor*
%USERPROFILE%\AppData\Local\Cursor*
%USERPROFILE%\AppData\Roaming\Cursor*
%USERPROFILE%\cursor*
as listed here
Thanks!