diff --git a/R/files/r_packages_cleanup.sh b/R/files/r_packages_cleanup.sh index e86b4f68..c506d405 100644 --- a/R/files/r_packages_cleanup.sh +++ b/R/files/r_packages_cleanup.sh @@ -6,6 +6,7 @@ for package in r-base r-base-core r-base-dev r-base-html r-cran-boot r-cran-clas # Remove the old r packages apt-get purge r-base-* r-cran-* -y --force-yes apt-get autoremove -y +apt-get update # Remove the CRAN packages rm -fr /usr/lib/R/site-library /usr/local/lib/R/site-library diff --git a/R/tasks/r-installation.yml b/R/tasks/r-installation.yml index bd74f03c..d928df9f 100644 --- a/R/tasks/r-installation.yml +++ b/R/tasks/r-installation.yml @@ -15,7 +15,7 @@ tags: [ 'r_software', 'r_pkg', 'r_pkg_hold' ] - name: Install the R base packages. - apt: pkg={{ item }} state={{ r_packages_main_state }} force=yes + apt: pkg={{ item }} state={{ r_packages_main_state }} force=yes update_cache=yes cache_valid_time=3600 with_items: r_base_packages_list tags: [ 'r_software', 'r_pkg' ]