'Is it safe to remove old .PhpStorm directories
Each time I upgrade PhpStorm to a new point release I'm left with the previous version in my home directory. I now have directories for PhpStorm2017.1, PhpStorm2017.2, PhpStorm2017.3, PhpStorm2018.1, PhpStorm2018.2 and the current version PhpStorm2018.3. These are taking up about 4.5GB in my home directory and I'd like to recover that.
Is its safe to simply rm -rf
all the previous directories? Or is there some sort of hierarchical storage of settings?
Solution 1:[1]
Yes, it is safe to delete them if you will not go back to that version again (e.g. if you decide not to continue your subscription where you have a right to use your 1-year old version -- depends on subscription).
If you do not have such plans then you may safely delete such folders (I delete them; I keep only currently used versions). Otherwise consider keeping config & plugins (see below) for the last 4 versions (up to 2017.3 in your case; zip them for convenience) as that should be the fallback version.
What OS are you using there?
You may keep settings/plugins if you wish (they do not take that much space anyway, especially if you zip them) but get rid of old caches/indexes and logs (as they will be re-generated as needed).
- https://intellij-support.jetbrains.com/hc/en-us/articles/206544519-Directories-used-by-the-IDE-to-store-settings-caches-plugins-and-logs
- https://www.jetbrains.com/help/phpstorm/2021.2/directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html
E.g.
- for Windows, just get rid of the
C:\Users\USERNAME\.PhpStorm2018.2\system
folder (use appropriate version folder). - Linux should be similar:
~/.PhpStorm2018.2/system
- for Mac: you need to delete
Caches
andLogs
folders
From 2021.2 version the IDE can automatically clean up folders for old versions (not used for the last 180 days). This can be accessed at any time via Help | Delete Leftover IDE Directories
: https://www.jetbrains.com/help/phpstorm/2021.2/directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html#clean-up-old-ide-dirs
If you invoke that action you will have a notification popup; once you click it you will see this kind of window:
(NOTE: the screenshot is from 2021.2.1 and it filters out current IDE version)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |