PyCharm caches a great number of files, 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. Also, the only way to solve some conflicts is to clean out the cache.
note
Files will not be deleted until you restart PyCharm.
Opening and closing a project does not result in deleting any files.
Go to File | Invalidate Caches/Restart.
In the Invalidate Caches dialog, select the relevant action. You can invalidate the caches and restart the IDE or just restart the IDE.
tip
If any of the old version files or directories remain after cleaning the IDE cache, select Help | Delete Leftover IDE Directories from the main menu.