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.
note
The default location of the IDE directories has changed starting from PyCharm version 2020.1. If you had a previous version, new installations will import configuration from the old directories. For information about the location of the default directories in previous IDE versions, see the corresponding help version, for example: https://www.jetbrains.com/help/pycharm/2019.3/tuning-the-ide.html#default-dirs.
You can move the default IDE directories, for example, if the user profile drive runs out of space or it is located on a slow disk, if the home directory is encrypted (slowing down the IDE) or is located on a network drive, if you want to create a portable installation or exclude caches from home directory backups, and so on.
From the main menu, select Help | Edit Custom Properties.
Set the property that corresponds to the necessary directory:
Property |
Path to |
---|---|
|
|
|
|
|
|
|
Specify paths with forward slashes /, including Windows paths (for example, C:
You can insert any other properties as variables. For example, use ${user.home}
(standard Java system property) to specify paths relative to the user's home directory:
idea.config.path=${user.home}/MyIdeaConfiguration
After you restart PyCharm, it will use the new location of the corresponding directory.
Every time you install a new major version of PyCharm, it uses a new set of IDE directories and automatically deletes the caches and logs directories for older versions of the IDE that have not been updated in the last 180 days. The configuration and plugins directories will remain forever, unless you remove them manually.
From the main menu, select Help | Delete Leftover IDE Directories
In the Delete Leftover IDE Storage Directories dialog, select the versions of the IDE that you are not planning to use and click Delete.