Completely uninstall RStudio for clean Reinstall

install

#1

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)
1537289078899:file.info(list.files('.rstudio-desktop', recursive = TRUE, full.names = TRUE, all.files = TRUE))
1537289097258:x = file.info(list.files('.rstudio-desktop', recursive = TRUE, full.names = TRUE, all.files = TRUE))
1537289105417:x[x$size > 0, ]
1537289643670:print('pre-uninstall')

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 
0:file.info(list.files('.rstudio-desktop', recursive = TRUE, full.names = TRUE, all.files = TRUE))
0:x = file.info(list.files('.rstudio-desktop', recursive = TRUE, full.names = TRUE, all.files = TRUE))
0:x[x$size > 0, ]
0:print('pre-uninstall')
1537289893165:print('post-re-install')

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?


#2

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.


#3

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: