Completely uninstall RStudio for clean Reinstall

This comes at my wit's end from this bug which has rendered RStudio completely unusable for my purposes on my machine:

Suspecting there might be some cache issue at play (i.e. along the lines of Part II of my ongoing rJava + 3.5.1 nightmare), I decided to try a clean re-install of RStudio.

Not really knowing how to uninstall things on Mac, I dragged RStudio to the Trash can & ran rm -rf .rstudio and rm -rf .rstudio-desktop to be sure I'm rid of everything.

Nevertheless, some files appear to have been retained.

Upon reinstall, I examined .rstudio-desktop/history_database and quickly recognized some commands from before uninstallation. Here's that with more intention:

tail -n 5 ~/.rstudio-desktop/history_database 
1537289065265:list.files('.rstudio-desktop', recursive = TRUE, full.names = TRUE, all.files = TRUE)'.rstudio-desktop', recursive = TRUE, full.names = TRUE, all.files = TRUE))
1537289097258:x ='.rstudio-desktop', recursive = TRUE, full.names = TRUE, all.files = TRUE))
1537289105417:x[x$size > 0, ]

Then uninstall RStudio as above (& Empty Trash to be sure), and re-install from the .dmg and lo and behold:

tail -n 5 ~/.rstudio-desktop/history_database'.rstudio-desktop', recursive = TRUE, full.names = TRUE, all.files = TRUE))
0:x ='.rstudio-desktop', recursive = TRUE, full.names = TRUE, all.files = TRUE))
0:x[x$size > 0, ]

So, obviously the attempt to uninstall was a failure. I'm noticing now that the timestamps for the old commands have reset, at least, somehow...

How can I completely wipe RStudio from my machine?

On macOS, there are also some application-specific caches in the ~/Library/Caches folder; at least on my machine I see org.rstudio.RStudio and RStudio folders. You could try removing those as well.

All of the application state managed explicitly by RStudio is indeed stored within the ~/.rstudio-desktop folder, though -- removing that and RStudio should be enough to clear out its state.


Hmm, removing the things found by ls /Library/Caches | grep "R" didn't seem to make a difference... history_database still retains the old commands :thinking:

Here is one minor suggestion. Prior to the removal of RStudio 0.98.507, you should first log into your Mac with an administrator account, and turn RStudio 0.98.507 off if it is running. Also give a try to uninstall R studio from Anaconda control panel by following this guide.