MacOS での統計ソフトRのアンインストール
MacにインストールしたRが古くなり、パッケージが動かない状況も見受けられるので一旦アンインストールして、その上で最新版をインストールしようと思いました。でも、RってApplestoreからインストールしたアプリでないのと、アンインストーラが付属していないので、どうやって削除するのか。まずは下調べです。
<https://cran.r-project.org/doc/manuals/r-release/R-admin.html#Uninstalling-under-macOS>
4.2 Uninstalling under macOS
R for macOS consists of two parts: the GUI (R.APP) and the R framework. The un-installation is as simple as removing those folders (e.g. by dragging them onto the Trash). The typical installation will install the GUI into the /Applications/R.app folder and the R framework into the /Library/Frameworks/R.framework folder. The links to R and Rscript in /usr/local/bin should also be removed.
If you want to get rid of R more completely using a Terminal, simply run:
sudo rm -rf /Library/Frameworks/R.framework /Applications/R.app \
/usr/local/bin/R /usr/local/bin/RscriptThe installation consists of up to four Apple packages:18 org.r-project.R.el-capitan.fw.pkg, org.r-project.R.el-capitan.GUI.pkg, org.r-project.x86_64.tcltk.x11 and org.r-project.x86_64.texinfo. You can use pkgutil –forget if you want the Apple Installer to forget about the package without deleting its files (useful for the R framework when installing multiple R versions in parallel), or after you have deleted the files.
Uninstalling the Tcl/Tk or Texinfo components (which are installed under /usr/local) is not as simple. You can list the files they installed in a Terminal by
pkgutil –files org.r-project.x86_64.tcltk.x11
pkgutil –files org.r-project.x86_64.texinfoThese are paths relative to /, the root of the file system.
上記を自動翻訳するとこんな感じです。
R for macOSは、GUI(R.APP)とRフレームワークの2つの部分で構成されています。アンインストールは、それらのフォルダを削除するだけで簡単です(例えば、ゴミ箱にドラッグするなど)。標準的なインストールでは、GUIは/Applications/R.appフォルダに、Rフレームワークは/Library/Frameworks/R.frameworkフォルダにインストールされます。 / usr / local / binにあるRおよびRscriptへのリンクも削除する必要があります。
> sudo rm -rf /Library/Frameworks/R.framework /Applications/R.app \
/usr/local/bin/R /usr/local/bin/Rscript
rm -rf /