Support

Resetting RStudio Desktop's State

Follow

Overview

RStudio Desktop stores your custom settings and options in a hidden directory called RStudio-Desktop. If this directory does not exist, RStudio will create it on start up. This directory includes user settings, log files, and other state information. Removing (or renaming) this directory will reset RStudio's state analogous to a fresh installation.

We recommend renaming this directory to create a backup version instead of completely deleting it. This allows you to save your settings, in case you want to revert back to them. Additionally, if you experienced a crash or RStudio failed to start, this directory may contain vital information for determining the source of the error. In this case, we recommend renaming this directory to backup-rstudio-desktop and sending it along if asked by RStudio Support.

Some versions of RStudio Desktop store additional preferences (such as the size and location of the window and the rendering mode) in a separate location. To fully reset state, this must also be deleted or renamed, as described below in "Resetting Other Preferences".

If you are using RStudio Projects, we'd also recommend resetting the project-specific state if you're having issues - you can do this by navigating to the Project's folder in your file browser, and renaming the .Rproj.user directory there.

Accessing the RStudio-Desktop Directory

Windows

You can open an Explorer window into the RStudio-Desktop directory by typing the following command into Start -> Run:

For Windows 7, 8 and 10:

%localappdata%\RStudio-Desktop

You can then rename this directory to backup-rstudio-desktop and send it with your support request.

Mac OS X

You can easily create a backup by running the following command from the terminal. Then you can send this backup with your support request:

mv ~/.rstudio-desktop ~/backup-rstudio-desktop

Alternatively, you can open a Finder window into the rstudio-desktop directory by typing the following command at the Terminal:

open ~/.rstudio-desktop

Linux

You can easily create a backup by running the following command from the terminal. Then you can send this backup with your support request:

mv ~/.rstudio-desktop ~/backup-rstudio-desktop

Alternatively, you can open a File Browser into the rstudio-desktop directory by typing the following command at the Terminal:

nautilus ~/.rstudio-desktop

Resetting Other Preferences

Windows

You can open an Explorer window into the RStudio preferences directory by typing the following command into Start -> Run:

For Windows 7, 8 and 10:

%appdata%\RStudio

You can then rename this directory to backup-rstudio and send it with your support request.

Mac OS X

To create a backup, run the following command from the terminal. You can then include the file ~/backup-rstudio-prefs with your support request:

defaults read com.rstudio.desktop > ~/backup-rstudio-prefs

To delete these settings, run the following command from the terminal. Use caution; this cannot be undone unless you have created the backup file, and deleting anything other than com.rstudio.desktop could create serious problems with your system.

defaults delete com.rstudio.desktop

Linux

You can easily create a backup by running the following command from the terminal. Then you can send this backup with your support request:

mv ~/.config/RStudio ~/backup-RStudio

Alternatively, you can open a File Browser into the RStudio preferences directory by typing the following command at the Terminal:

nautilus ~/.config/RStudio

Return to Troubleshooting Guide: Using RStudio

Comments