PyCharm caches a great number of files for all projects that you have ever worked with in this IDE version, therefore, the system cache may become overloaded. Sometimes the caches will never be needed again, for example, if you work with frequent short-term projects.
When you invalidate the cache, PyCharm removes the cache files for all projects ever run in the current version of the IDE. The files will be recreated the next time you open these projects.
note
Note the following before you proceed:
The caches will not be deleted until you restart PyCharm.
Opening and closing a project without invalidating the cache does not result in deleting any cached files.
Local History is not deleted when you invalidate the cache unless you explicitly enable this option in the Invalidate Caches dialog. However, mind that Local History has a retention period of 5 working days by default.
Clear system cache
Select File | Invalidate Caches from the main menu.
In the Invalidate Caches dialog, you can select additional actions that the IDE will perform while removing the cache files:
Clear file system cache and Local History: remove the virtual file system cache together with the information stored in Local History.
This action might be helpful for troubleshooting purposes when the usual cache invalidation is not enough to solve the problem.
Clear VCS Log caches and indexes: remove the cache and indexes of the VCS Log.
Enable this option if you are certain that your VCS Log indexes are broken, for example, if the Log search doesn't work correctly.
Mark downloaded shared indexes as broken: do not use the already downloaded shared indexes. After invalidation, PyCharm will download and use new indexes if they are available. Otherwise, new indexes will be built locally.
Delete embedded browser engine cache and cookies: remove the cache files and cookies that are stored in the built-in JCEF browser.
These files rarely get broken. This option allows you to invalidate the cache while keeping JCEF cookies and caches intact.
Click Invalidate and Restart.
If you click Just restart, cache files won't be deleted, and the selected optional actions won't be applied.
tip
We recommend that you restart the IDE via Find Action: press CtrlShift0A and type Restart IDE.
Our website uses some cookies and records your IP address for the purposes of accessibility, security, and managing your access to the telecommunication network. You can disable data collection and cookies by changing your browser settings, but it may affect how this website functions. Learn more.
With your consent, JetBrains may also use cookies and your IP address to collect individual statistics and provide you with personalized offers and ads subject to the Privacy Notice and the Terms of Use. JetBrains may use third-party services for this purpose. You can adjust or withdraw your consent at any time by visiting the Opt-Out page.