How to uninstall IntelliJ IDEA on Mac


  There is no one-click uninstaller for IDEA under the Mac system, and there is no plug-in for complete uninstallation. To completely delete it, in addition to deleting IDEA in the application (Application) and placing it in the trash, you also need to delete the corresponding files and files in the terminal (Terminal). folder.


1 分文件卸载
	1.1删除应用程序文件
	1.2删除支持文件
	1.3删除设置文件
	1.4删除程序状态文件
	1.5删除偏好设置数据
	1.6删除缓存文件
	1.7删除缓存数据
	1.8删除日志数据
	1.9删除诊断及崩溃日志文件
	1.10删除其他相关文件
2 一键命令删除

1 point file uninstall

  Mac 下安装 IDEA 时,很多文件会散落在不同的目录。卸载时,你只需要删除相应的目录及文件即可。下面我们列出了卸载 IDEA 组件及对应的目录文件路径

1.1 Delete application files

Delete the IDEA program itself. If multiple versions are not installed, just run the following command.

# 删除 IDEA 程序本身,如果没有安装多个版本,如下命令即可
rm -r /Applications/IntelliJ\ IDEA.app

# 示例如下
# rm -r /Applications/IntelliJ\ IDEA.app

1.2 Delete support files

Delete IDEA specified version application data and plug-in data, etc.

# 删除 IDEA 指定版本应用数据及插件数据等等
rm -r ~/Library/Application\ Support/IntelliJIdea{
    
    指定版本}
rm -r ~/Library/Application\ Support/Jetbrains/Idea{
    
    ...}

# 示例如下
# rm -r ~/Library/Application\ Support/IntelliJIdea2021.1/

1.3 Delete settings file

# 删除当前 IDEA 设置文件
rm -r ~/Library/Preferences/com.jetbrains.intellij.plist

1.4 Delete program status files

# 删除当前 IDEA 状态目录
rm -r ~/Library/Saved\ Application\ State/com.jetbrains.intellij.savedState/

1.5 Deletion of preference data

Delete the preferences related to the specified version of IDEA.

# 删除 IDEA 指定版本相关的偏好设置
rm -r ~/Library/Preferences/IntelliJIdea{
    
    指定版本}

# 示例如下
# rm -r ~/Library/Preferences/IntelliJIdea2021.1/

1.6 Delete cache files

A path similar to the following:

rm -rf /private/var/folders/qb/t8msqsh96f5b999zn475xrmr0000gn/C/com.jetbrains.intellij/

1.7 Delete cached data

Delete cache data related to the specified version of IDEA.

# 删除 IDEA 指定版本相关的缓存数据
rm -r ~/Library/Caches/IntelliJIdea{
    
    指定版本}
rm -rf ~/Library/Caches/JetBrains/IntelliJIdea{
    
    ...}
rm -rf ~/Library/Caches/JetBrains/Idea{
    
    ...}

# 示例如下
# rm -r ~/Library/Caches/IntelliJIdea2021.1/

1.8 Delete log data

Delete the log generated when the specified version of IDEA is run.

# 删除 IDEA 指定版本运行时,产生的日志
rm -r ~/Library/Logs/IntelliJIdea{
    
    指定版本}
rm -r ~/Library/Logs/JetBrains/Idea{
    
    ...}

# 示例如下
# rm -r ~/Library/Logs/IntelliJIdea2021.1/

1.9 Delete diagnostic and crash log files

The diagnostic logs of the application are placed /Library/Logs/DiagnosticReportsunder the path. The idea program is similar to the following:

# 删除 PyCharm 崩溃日志
rm -r /Library/Logs/DiagnosticReports/idea_2023-08-04-150310_HoneydeMacBook-Pro.wakeups_resource.diag
rm -r /Library/Logs/DiagnosticReports/idea_xxxx

# 前缀匹配一次性删除即可
rm -r /Library/Logs/DiagnosticReports/idea*

There will also be some crash logs in the following path:

# 类似如下的崩溃日志记录
rm -r ~/Library/Application\ Support/CrashReporter/idea_2D466672-CB81-5682-960F-E587C2158A5A.plist

1.10 Delete other related files

Delete other related files under the current user.

# 删除 IDEA 指定版本的其他配置文件
rm -r ~/.IntelliJIdea{
    
    指定版本}/

rm -rf ~/Library/WebKit/com.jetbrains.intellij/

# 示例如下
# rm -r ~/.IntelliJIdea15/restart/restarter

2 One-click command to delete

If deleting files one by one is tedious, you can do it all at once with the following command:
First confirm the file directory, use the following command:

ls -d /Applications/* | grep IntelliJ* | tr '\n' '\0' | xargs -0
ls -d ~/Library/Application\ Support/JetBrains/Toolbox/apps/* | grep IDEA* | tr '\n' '\0' | xargs -0
ls -d ~/Library/Application\ Support/JetBrains/* | grep Idea* | tr '\n' '\0' | xargs -0
ls -d ~/Library/Preferences/* | grep com.jetbrains.intellij* | tr '\n' '\0' | xargs -0
ls -d ~/Library/Saved\ Application\ State/* | grep com.jetbrains.intellij* | tr '\n' '\0' | xargs -0 
ls -d ~/Library/Caches/JetBrains/* | grep Idea* | tr '\n' '\0' | xargs -0
ls -d ~/Library/Logs/JetBrains/* | grep Idea* | tr '\n' '\0' | xargs -0
ls -d /Library/Logs/DiagnosticReports/* | grep idea_* | tr '\n' '\0' | xargs -0

Remove commands together:

ls -d /Applications/* | grep IntelliJ* | tr '\n' '\0' | xargs -0 rm -rf
ls -d ~/Library/Application\ Support/JetBrains/Toolbox/apps/* | grep IDEA* | tr '\n' '\0' | xargs -0 rm -rf
ls -d ~/Library/Application\ Support/JetBrains/* | grep Idea* | tr '\n' '\0' | xargs -0 rm -rf
ls -d ~/Library/Preferences/* | grep com.jetbrains.intellij* | tr '\n' '\0' | xargs -0 rm -rf
ls -d ~/Library/Saved\ Application\ State/* | grep com.jetbrains.intellij* | tr '\n' '\0' | xargs -0 rm -rf
ls -d ~/Library/Caches/JetBrains/* | grep Idea* | tr '\n' '\0' | xargs -0 rm -rf
ls -d ~/Library/Logs/JetBrains/* | grep Idea* | tr '\n' '\0' | xargs -0 rm -rf
ls -d /Library/Logs/DiagnosticReports/* | grep idea_* | tr '\n' '\0' | xargs -0 rm -rf

Just copy the above command and paste it in the command terminal. The last command requires pressing Enter.

Guess you like

Origin blog.csdn.net/m0_49447718/article/details/132104316