How to update R and RStudio without breaking my configuration?

I want to update R and RStudio to current versions, but I have a book in progress and do not want to break its configuration. Is there a reliable set of steps to do this?

I guess it depends what you mean by "configuration".

Installed packages, mainly, I guess. My projects are dependent on those, and I suppose all else is covered by the .yml, .css, and .Rproj files?

What version of R/RStudio are you currently using and what system are you running it on (ie Windows, Mac, Linux)?

R 4.2.2 and RStudio 2023.12.1 Build 402
Running on Windows 10 at present, but considering Linux in future.

Would use renv::init() to set up a lockfile of packages in their current versions, which you can use to reactivate your project, assuming you are using an Rproject to manage the book files. More information would help.