Restart R session

Hello. When I try to install many packages in a row, I often get the following error message:

**One or more of the packages that will be updated by this installation are currently loaded. Restarting R prior to updating these packages is strongly recommended.

RStudio can restart R and then automatically continue the installation after restarting (all work and data will be preserved during the restart)

Do you want to restart R prior to installing?**

Could you, please, tell me, how to succesfully install packages without receiving such a error?

That is not an error, if your session has packages loaded then you are going to receive that message and possibly is going to prevent you from installing the package.
The solution is to restart your RStudio session (not just your R session) and install the problematic package before doing anything else.

If that doesn't work try installing from the R GUI instead and make sure you are not loading any packages through a start-up file ( or .Rprofile)

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.