PDF download Download Article
Try one of these methods to update rlang quickly & easily
PDF download Download Article

Are you trying to update your rlang package in RStudio or the R Console? This package is notoriously finicky to update, so if you're struggling to update it, you're not alone! In this article, we'll go over how to update rlang with a command, as well as in the RStudio GUI. We have included some troubleshooting tips for the most common issues when updating rlang.

Quick Steps to Update Your Rlang Package

  1. Clear your R environment with rm(list = ls ()).
  2. Restart RStudio or R Console, making sure not to load any packages once it restarts.
  3. Run the command install.packages("rlang") to update rlang.
Section 1 of 3:

Updating Rlang With a Command

PDF download Download Article
  1. You can do this in both RStudio or the R Console, whichever you prefer working with. Run the following command to clear your R environment:

    rm(list = ls ())

  2. The reason you want to clear your R environment and restart RStudio or the R Console is to ensure no other packages load that use rlang. This will cause issues when trying to update the package.
    • In RStudio, you can alternatively press Ctrl+Shift+F10 to clear your global environment and restart the application.
    Advertisement
  3. When you restart RStudio or R Console, make sure to update your rlang package before you do anything else to avoid errors or the update not working. The command to update rlang is as follows:

    install.packages("rlang")

    • If you need to update rlang to a specific version, not just the latest, you can use this command, where [url] is the URL to the package on CRAN's website:

      install.packages("[URL]", repo=NULL, type= "source")

    • You can also choose to update all of your R packages (including rlang) with the following command:

      update.packages(checkBuilt = TRUE)

  4. Advertisement
Section 2 of 3:

Updating Rlang With the RStudio GUI

PDF download Download Article
  1. If RStudio is currently open on your computer, close it and open it again. You can press Ctrl+Shift+F10 to restart RStudio while also clearing the global environment.
  2. It's a tab near the top of the window, between Plots and Help. Do this before you do anything else in RStudio to avoid getting errors when updating rlang.
    • You can use this window to check your rlang version if you're not sure what version you're using.
  3. This indicates that you only want to update rlang. You can check multiple boxes here if you want to update multiple packages.
  4. It's above your package list, with a green arrow button. This will check for any updates for the selected packages (rlang, in this case).
    • Follow the steps presented in the GUI to update rlang.
    • You can also check for updates by clicking the Tools menu and selecting Check for Package Updates….
  5. Advertisement
Section 3 of 3:

Troubleshooting

PDF download Download Article
  1. You likely have your settings set to save your workspace to .RData when RStudio closes. You can fix this by doing the following:
    • Go to Tools > Global Options… > General. The "General" tab is the top tab in your RStudio settings and should open by default.
    • Uncheck the box next to "Restore .RData into workspace at startup".
    • In the dropdown next to "Save workspace to .RData on exit", select Never.
    • Click Apply, then OK to save your settings. RStudio will now clear your global environment the next time you restart.
  2. Many packages are dependent on rlang. If these packages are loaded in RStudio or R Console, you won't be able to update the package. If restarting RStudio/R Console with a clear environment doesn't help, you may have to uninstall rlang completely and reinstall the newer version.
    • Load the installer package by running the following command:

      library(installr)

    • Uninstall rlang with the following command:

      uninstall.packages("rlang")

    • Restart RStudio or R Console.
    • Install rlang with the following command:

      install.packages("rlang", dependencies = TRUE)

  3. Advertisement

Expert Q&A

Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement

Tips

Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!

You Might Also Like

Update R Update R in RStudio or Manually: Step-by-Step Guide
Install or Remove an RPM PackageInstall or Remove an RPM Package
Yum Update Update Linux Packages With Yum
Update Pip Upgrade Pip: Quick Guide for Beginners & Experts
Java Macos Uninstall Uninstall Java & JDK on Mac: Step-by-Step Tutorial
Yum UninstallYum Uninstall Guide: Remove Packages and Dependencies
Update Blender Update Blender: 3 Easy Methods for Windows, macOS, and Linux
Why Does Roblox Keep CrashingGetting Disconnected from Roblox? Here are 10 Quick Fixes
Run a Program from the Command Line on LinuxRun a Program from the Command Line on Linux
Update Java Update or Download Java on PC, Mac, or Linux
Pip Uninstall Package Uninstall a Python Package With Pip: Step-by-Step Guide
Reinstall Discord Reinstall Discord: Windows & MAc
Run Ruby CodeRun Ruby Code
Uninstall Razer Synapse on PC or MacUninstall Razer Synapse on PC or Mac
Advertisement

About This Article

Luigi Oppido
Reviewed by:
Computer & Tech Specialist
This article was reviewed by Luigi Oppido and by wikiHow staff writer, Hannah Dillon. Luigi Oppido is the Owner and Operator of Pleasure Point Computers in Santa Cruz, California. Luigi has over 25 years of experience in general computer repair, data recovery, virus removal, and upgrades. He is also the host of the Computer Man Show! broadcasted on KSQD covering central California for over two years. This article has been viewed 3,440 times.
How helpful is this?
Co-authors: 7
Updated: June 21, 2025
Views: 3,440
Categories: Programming
Thanks to all authors for creating a page that has been read 3,440 times.

Is this article up to date?

Advertisement