Video Notes
The following steps show how to completely delete RStudio, along with any of its settings and configurations, from a Mac computer.
Remove Packages (optional)
First, if you want to remove any R packages you installed so that you’re left with only the base R packages, run the following command in the RStudio console:
installed_pkgs <- installed.packages()[, "Package"]
installed_pkgs <- installed_pkgs[!(installed_pkgs %in% base::loadedNamespaces())]
remove.packages(installed_pkgs)
Don’t be alarmed when this command yields an error:
Error in remove.packages : packages ‘parallel’, ‘splines’, ‘stats4’, ‘tcltk’ are base packages, and cannot be removed
This error is expected— it informs us that the base R packages were not deleted, which is fine since our goal is only to remove the packages we installed.
After completing this step, close RStudio.
Delete RStudio and Associated Files
Next, run the following command in a command line program such as Terminal to delete the RStudio application and all associated configuration and setting files:
sudo rm -rf /Applications/RStudio.app \
~/.config/rstudio \
~/Library/Application\ Support/RStudio \
~/.local/share/rstudio/ \
~/.rstudio-desktop \
~/Library/Preferences/org.rstudio.RStudio.plist \
~/Library/Caches/org.rstudio.RStudio
Note - This is a comprehensive list of paths and some of them may not exist on your computer depending on your system and version of RStudio you’re running. We’re just being thorough with this "sweep" to make sure any/all RStudio related files are removed.
After completing the above step, RStudio should be completely removed from your computer. If you were to re-install, you should find it is a completely fresh installation with no prior preferences or settings retained.
Deleting R (Optional)
If you want to go one step further and delete R as well, you can use these commands:
sudo rm -rf /Library/Frameworks/R.framework \
/usr/local/bin/R \
/usr/local/bin/Rscript
Unlock all notes for $4
For $4, you’ll get 6 months of unlimited access to the notes for the above video
and all of my other 200+ guides and videos.
This is a one-time payment— no subscriptions or auto-renewals to worry about cancelling.
Your support helps me continue creating free, high-quality videos. Thank you!