remove r-recommended package
r-recommended is a collection of common CRAN packages,
which cause conflicts when trying to install older R.
These same packages can be regular dependencies retrieved from CRAN.
MODIFY
repo2docker/buildpacks/_r_base.py
repo2docker/buildpacks/_r_base.py
@@ -37,7 +37,7 @@ def rstudio_base_scripts(r_version):
echo '{rstudio_sha256sum} /tmp/rstudio.deb' | sha256sum -c - && \
echo '{shiny_sha256sum} /tmp/shiny.deb' | sha256sum -c - && \
apt-get update > /dev/null && \
- apt install -y /tmp/rstudio.deb /tmp/shiny.deb > /dev/null && \
+ apt install -y --no-install-recommends /tmp/rstudio.deb /tmp/shiny.deb && \
rm /tmp/rstudio.deb && \
apt-get -qq purge && \
apt-get -qq clean && \

MODIFY
repo2docker/buildpacks/r.py
repo2docker/buildpacks/r.py
@@ -38,8 +38,9 @@ class RBuildPack(PythonBuildPack):
- are needed by a specific tool
- The `r-base` package from Ubuntu apt repositories is used to install
- R itself, rather than any of the methods from https://cran.r-project.org/.
+ The `r-base-core` package from Ubuntu or "Ubuntu packages for R"
+ apt repositories is used to install R itself,
+ rather than any of the methods from https://cran.r-project.org/.
The `r-base-dev` package is installed as advised in RStudio instructions.
"""
@@ -293,9 +294,9 @@ class RBuildPack(PythonBuildPack):
"root",
r"""
apt-get update > /dev/null && \
- apt-get install --yes r-base={R_version} r-base-core={R_version} \
+ apt-get install --yes --no-install-recommends \
+ r-base-core={R_version} \
r-base-dev={R_version} \
- r-recommended={R_version} \
libclang-dev \
libzmq3-dev > /dev/null && \
apt-get -qq purge && \

MODIFY
tests/unit/test_r.py
tests/unit/test_r.py
@@ -147,7 +147,7 @@ def test_custom_cran_apt_repo(tmpdir):
# check that we install the right package
for user, script in scripts:
- if "r-base=3.5" in script:
+ if "r-base-core=3.5" in script:
break
else:
assert False, "Should have installed base R"

remove r-recommended package

r-recommended is a collection of common CRAN packages,
which cause conflicts when trying to install older R.

These same packages can be regular dependencies retrieved from CRAN.