background
This article is about IDEA for macos.
If you install a new version of idea, if there is a large version difference between the new version and the old version, it seems that you cannot directly upgrade through the "check updates" in the idea, so you have to reinstall it.
Reinstallation often encounters that the installed idea cannot be opened, which means that the old version has not been uninstalled cleanly.
Some friends may wonder why the previous configuration cannot be retained after reinstallation? It should be possible, but this article only introduces a complete reinstallation of IDEA, so the first task is how to clear out old files (there are still old files after normal uninstallation)
Clean and clean uninstall IDEA
After uninstalling IDEA normally, in
# 进入目录,其中xxx是用户名
cd Users/xxx/Library/ (cd ~/Library)
# 其中YYY是版本号,注意替换一下
rm -rf Logs/IntelliJIdeaYYY/
rm -rf Preferences/IntelliJIdeaYYY/
rm -rf Application\ Support/IntelliJIdeaYYY/
rm -rf Caches/IntelliJIdeaYYY
后来发现不知道是不是新版本,在这些目录也是需要删除的
/Users/stonewang/Library/Application Support/JetBrains
/Users/stonewang/Library/Logs/JetBrains
/Users/stonewang/Library/Caches/JetBrains