LoginSignup
41
34

More than 5 years have passed since last update.

Mac への IntelliJ IDEA インストールと完全にアンインストールする方法

Last updated at Posted at 2016-12-27

JetBrains IntelliJ IDEA の インストールする方法と、アンインストールする方法についてです。

IntelliJ IDEA Ultimateに、変更するときに、community versionを消さないと、
Ultimate と community の 2つのversionが混在してうざいので、
1. IntelliJ IDEA をアンインストール方法
2. Intellij IDEA のインストール方法
についてまとめます。

前提

インストール方法としては、公式サイトから、
1. インストーラーをダウンロードする
2. brew cask を使用してインストールする
の2通りあります。
今回は、brew caskを使用して、インストールを行う方法と、アンインストールする方法についてまとめていきます。

brew については、公式リンク貼っておくので、わからない方は、そちらを参照してください。
Homebrew
Homebrew-Cask

Intellij IDEA のアンインストール方法

brew uninstall しても、設定ファイルや、cacheは残るため、uninstall 後に、不要なファイルは削除します。
JetBrains Directories
のMac OS X に乗っているディレックトリのファイルが不要なため削除していきます。

brew から削除

# community Edition の uninstall
$ brew cask uninstall intellij-idea-ce

$HOME/Library/Preferences/ の検索 & 削除

$ ls -la ~/Library/Preferences/ | grep -i jetbrains
$ rm -rf ~/Library/Preferences/com.jetbrains.intellij.* 

$ ls -la ~/Library/Preferences/ | grep -i intellij
$ rm -rf ~/Library/Preferences/IntelliJIdea***/

$HOME/Library/Caches/ の検索

$ ls -la ~/Library/Caches/ | grep -i jetbrains
$ rm -rf ~/Library/Caches/Jetbrains**/

$ ls -la ~/Library/Caches/ | grep -i intellij
$ rm -rf ~/Library/Caches/IntelliJIdea***/

$HOME/Library/Application Support/ の検索

$ ls -la ~/Library/Application\ Support/ | grep -i jetbrains
$ rm -rf ~/Library/Application\ Support/Jetbrains***/

$ ls -la ~/Library/Application\ Support/ | grep -i intellij
$ rm -rf ~/Library/Application\ Support/IntelliJIdea***/

$HOME/Library/Logs/ の検索

$ ls -la ~/Library/Logs/ | grep -i jetbrains
$ rm -rf ~/Library/Logs/Jetbrains***/

$ ls -la ~/Library/Logs/ | grep -i intellij
$ rm -rf ~/Library/Logs/IntelliJIdea***/

2017/12/07 追記

@TLamp が、検索&削除のワンライナーを作成してくれたので、本文にも転機させて頂きます。

ls -da ~/Library/Preferences/* | grep -i jetbrains | xargs rm -rf
ls -da ~/Library/Preferences/* | grep -i intellij | xargs rm -rf

ls -da ~/Library/Caches/* | grep -i jetbrains | xargs rm -rf
ls -da ~/Library/Caches/* | grep -i intellij | xargs rm -rf

find ~/Library/Application\ Support/ -maxdepth 1 -iname "*jetbrains*" -print0 | xargs -0 rm -rf
find ~/Library/Application\ Support/ -maxdepth 1 -iname "*intellij*" -print0 | xargs -0 rm -rf

find ~/Library/Saved\ Application\ State/ -maxdepth 1 -iname "*jetbrains*" -print0 | xargs -0 rm -rf
find ~/Library/Saved\ Application\ State/ -maxdepth 1 -iname "*intellij*" -print0 | xargs -0 rm -rf

ls -da ~/Library/Logs/* | grep -i jetbrains | xargs rm -rf
ls -da ~/Library/Logs/* | grep -i intellij | xargs rm -rf

Intellij IDEA の インストール方法

Intellij IDEA の 検索

$ brew cask search intellij
==> Partial Matches
intellij-idea                      intellij-idea-ce

検索結果のintellij-ideaが Ultimate version 、intellij-idea-ce が Community versionになります。

brew cask で Intellij IDEAをインストール

今回は、Ulitimateを入れていきます。

$ brew cask install intellij-idea

インストールが完了後、/Application/に、Intellij が追加されます。
Intetlijの設定などは、割愛します。

おまけ インストーラーでintellijをインストールしている場合

/Applications/ に 入っている Intellij を削除する

$ rm -rf /Applications/IntelliJ\ IDEA.app/
41
34
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
41
34