Why is R updating when I update Ubuntu?

I am using Ubuntu 20.04 LTS and I installed R via the CRAN website, not via any distro-specific packaging.

Nonetheless, in my "software updater" utility, Ubuntu keeps wanting me to download and update to the latest version of R. See the following:

I don't want to update because that regularly because it's a pain to update packages and I want to ensure I don't break anything (I'm using renv and it gives me warnings about the version of R I'm using).

Does anyone know why R is tied to Ubuntu's updating procedure? How can I change this?

Thank you!

CRAN instructions for installing R on Ubuntu tell you to add a deb repository (which always provides the latest R version) so if you have followed that, updating your system libraries is always going to try to update R unless you lock the package version.

This is an example with apt but there are many ways of doing this, you can simply google it and choose the option you like the most

sudo apt-mark hold <package-name>
1 Like

Thanks for the quick response!

Do you know the best way to refer to R? For example, I get the following with dpkg

$ sudo dpkg -S r-base-core
r-base-core: /usr/share/doc/r-base-core
r-base-core: /usr/share/doc/r-base-core/NEWS.0.gz
r-base-core: /usr/share/doc/r-base-core/NEWS.1.gz
r-base-core: /usr/share/doc/r-base-core/changelog.Debian.gz
r-base-core: /usr/share/doc/r-base-core/NEWS.rds.gz
r-base-core: /usr/share/doc/r-base-core/README.mathlib
r-base-core: /usr/share/doc/r-base-core/NEWS.pdf.gz
r-base-core: /usr/share/doc/r-base-core/NEWS.2.Rd.gz
r-base-core: /usr/share/doc/r-base-core/README.Atlas.gz
r-base-core: /usr/share/doc/r-base-core/NEWS.2.rds.gz
r-base-core: /usr/share/doc/r-base-core/NEWS.3.gz
r-base-core: /usr/share/doc/r-base-core/library
r-base-core: /usr/share/doc/r-base-core/changelog.gz
r-base-core: /usr/share/doc/r-base-core/README.gz
r-base-core: /usr/share/doc/r-base-core/NEWS.gz
r-base-core: /usr/share/lintian/overrides/r-base-core
r-base-core: /usr/share/doc/r-base-core/copyright
r-base-core: /usr/share/doc/r-base-core/NEWS.2.gz
r-base-core: /usr/share/doc/r-base-core/NEWS.Rd.gz
r-base-core: /usr/share/doc/r-base-core/NEWS.3.Rd.gz
r-base-core: /usr/share/doc/r-base-core/doc
r-base-core: /usr/share/doc/r-base-core/NEWS.3.rds.gz

So should I just lock r-base-core? Or are there other things to take care of?

No, sorry, but since the CRAN instructions tell you to installr-base and that triggers all the other dependencies I would try locking that.

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.