Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi there,
There can’t really be any guarantees if your code will work with the newer version of R. What I would suggest is to make sure to take a backup of your Droplet before proceeding with the upgrade:
https://docs.digitalocean.com/products/images/backups/
That way you can revert to a working version in case that anything goes wrong.
Regarding the upgrade itself, I could suggest following the official R installation guide:
# update indices
sudo apt update -qq
# install two helper packages we need
sudo apt install --no-install-recommends software-properties-common dirmngr
# add the signing key (by Michael Rutter) for these repos
# To verify key, run gpg --show-keys /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
# Fingerprint: E298A3A825C0D65DFD57CBB651716619E084DAB9
wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
# add the R 4.0 repo from CRAN -- adjust 'focal' to 'groovy' or 'bionic' as needed
sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
Best,
Bobby
Hi @sanjmeh,
There is never a 100% guarantee something won’t break when you update your server. Having said that, what could help is creating a backup prior to beginning the process. That way you can always revert back to a previous state. For this, I’ll recommend using the Snapshot product:
https://docs.digitalocean.com/products/images/snapshots/
As for the upgrade, you can try the following:
- # update indices
- sudo apt update -qq
- # install two helper packages we need
- sudo apt install --no-install-recommends software-properties-common dirmngr
- # add the signing key (by Michael Rutter) for these repos
- # To verify key, run gpg --show-keys /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
- # Fingerprint: E298A3A825C0D65DFD57CBB651716619E084DAB9
- wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
- # add the R 4.0 repo from CRAN -- adjust 'focal' to 'groovy' or 'bionic' as needed
- sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
If there are any problems you can’t solve after the update, you can now always revert back to the previous option with the Snapshot image you created.