Removing Local RStudio Packages

RStudio Server allows each user to maintain a local library of packages in addition to packages installed at a system level that are available to all users. While this allows for individual users to install packages for their personal use, as well as specific versions of packages, this can often lead to errors in loading libraries in RStudio. When a system package/library is loaded that has one or more dependencies, and a user has an older version of one or more of these dependencies installed locally, the system library will fail to load when a newer/updated dependent library is required. This occurs because RStudio will always first attempt to load a local version of any library before it loads a system version. To avoid this, it is generally advised to not duplicate packages/libraries that are available in the system library in the local library.

The following procedure details how to remove a locally installed package to avoid these version mismatches.

  • Log in to R Studio and go to the Files Browser window and select the Packages tab.
  • In the first set of packages listed under User Library, find the package to remove.
  • Click on the round gray X button to the right of the package version.

Screen capture of R Studio showing Browser window with Packages tab active and highlighted and arrow pointing to X to the right of package xml2

  • In the pop-up dialog window that appears, select OK to confirm the removal of the package.

Screen capture of R Studio package removal confirmation dialog windwo

  • Repeat this process for each local package to be removed.
Print Article


Article ID: 141954
Mon 3/7/22 3:08 PM
Mon 3/7/22 3:26 PM