Search code examples
pythonpycharmreinstall

How to hard reinstall PyCharm and Python?


I have been using Python with PyCharm with virtual environments and GitHub and there has been a lot of trial and error. I want to start fresh. I uninstalled Python and PyCharm with Windows's remove apps.

When uninstalling PyCharm I clicked option to delete everything there was to delete. Then I reinstalled restarted Windows and installed Python again and then PyCharm. When I launched PyCharm everything was exactly the same as before: same projects, same interpreters / virtual environments, same dependencies and same git capabilities.

I would really like to start fresh since now I have at least some more knowledge of these things, but can't seem to do so. I am not worried about losing my projects since the important ones are on GitHub.


Solution

  • You will have to manually delete a few directories used by the IDE and individual projects. This is an important fail-safe so you don't lose all your work and configurations should you need to reinstall PyCharm or uninstall it by mistake.

    See the documentation:

    Directories used by the IDE

    By default, PyCharm stores user-specific files for each IDE instance (configuration, caches, plugins, logs, and so on) in the user's home directory. However, you can change the location for storing those files, if necessary.

    This JetBrains blog post is also worth considering Directories used by the IDE to store settings, caches, plugins and logs.

    For example,

    same interpreters / virtual environments

    An interpreter is just a directory with a Python executable and installed libraries. Although the PyCharm IDE can index and keep track of your interpreters they are independent and you'll have to delete them separately when needed.

    same projects

    Each individual project contains a directory called .idea where the IDE settings for that project are stored. You can delete the .idea directory and keep the source code.