When I go to Preferences | Python Interpreter | Show All ... (as described here) and try to remove an old interpreter, it seems to be successfully removed.
If I close and reopen only the Project Interpreters popup window it seems to have saved my changes, but when I close and reopen the Preferences window the interpreters are still there.
This happens regardless of whether I access the preferences window from an open project or not, so it shouldn't be a project-specific issue.
The interpreters I'm trying to remove are for old projects that don't exist anymore (as in the path to the project including the python binary has been deleted).
How can I remove these unused interpreters?
Bonus: what should I do in the future when I delete a project to ensure this doesn't happen?
Looking at the logs, there was an error when trying to remove that said Configuration.PythonSdkDetailsDialog - Please specify a different SDK name
It turns out that I had a duplicate interpreter elsewhere in the interpreter list. Removing the duplicate (normally, using the minus button) and reopening the preferences window did the trick.
Here's what I ended up doing:
Using this link, I found my configuration directory. I that directory, there was a file at options/jdk.table.xml
which contained a list of interpreters.
Manually deleting entries here did the trick.
This still feels wrong to me, though, so I welcome a better solution.