IMPORTANT: Rolling back to a previous version of the RStudio IDE is not officially supported; these instructions are "use at your own risk".
This article is intended for users that need to rollback their installation of the RStudio IDE installation from 1.4 to an earlier release or version. This can be dangerous since new releases of RStudio IDE will often migrate the IDE's internal state to a new format, which may not be readable by older versions of the IDE. This may cause the loss of open files or sessions when rolling back to an earlier build, so please only do this if you have no alternative.
User Data Migration
RStudio IDE 1.3 and prior stores user state in
~/.rstudio, whereas RStudio IDE 1.4 stores user state in the XDG-compliant folder
When an R session in RStudio IDE 1.4 starts, it will check to see if
~/.rstudio exists, and
~/.local/share/rstudio doesn't. If this is the case, then it will migrate user state from the old folder to the new one.
This all happens automatically, so no action is necessary if you're migrating from 1.3 to 1.4. However, if for some reason you need to downgrade from 1.4 back to 1.3, you have three options:
Option 1: Do Nothing
If you do nothing, then RStudio IDE 1.3 will start with a blank slate after the downgrade, since all its data was migrated to the new 1.4 folder and 1.3 cannot migrate it back to
~/.rstudio. User settings (like themes and preferences) will be preserved, but sessions and open files will not.
Option 2: Use the Same Folder
If you think that you might have to downgrade to 1.3, then you can instruct RStudio IDE 1.4 to store state in
~/.rstudio, just like RStudio IDE 1.3 did. To do this, run
sysctl edit rstudio-server, then add this section:
Note that you must do this before IDE 1.4 is brought online. More info is available in the admin guide here: User State Storage
Option 3: Migrate Manually
If you wish to downgrade while keeping your user's sessions/files intact (so Option 1 isn't a possibility) and did not tell RStudio IDE 1.4 to use the old folders for user state (so Option 2 isn't a possibility), you'll need to manually move state backwards. To do this, move the contents of the
~/.local/share/rstudio folder back to
~/.rstudio as follows:
mv ~/.local/share/rstudio ~/.rstudio`
RStudio Workbench / RStudio Server Pro Only: Named User Licensing Data
To preserve Named User Licensing data (records of users seated in the active license, user lock state, user admin status) when rolling back RStudio Server Pro from 1.4 to 1.3:
After building RStudio Server Pro 1.3, locate the
users.bak file in the server-shared-storage-path (value set in
etc/rstudio/rserver.conf). Rename users.bak to users as follows:
sudo mv users.bak users
rstudio-server. User Named Licensing data will be in the same state as it was before the upgrade to 1.4.
Note 1: This step is only necessary if
rstudio-server was successfully started on 1.4.
rstudio-server will start successfully on 1.3 without performing this step, but users' state on the active license will be lost.