Quickly Installing New Packages on Multiple Versions of R

Is there a more efficient way to install new packages to the many versions of R on our many servers without producing warning messages?

Our current method is producing warning messages like the following:

Warning message:
package ‘blastula’ was built under R version 4.1.0

CURRENT METHOD:
On each server, we are running the following script which relies on the information in the r-versions configuration file for RStudio Workbench:

pkg_tgt <- "blastula"

library(dplyr)
data <- read.delim("/etc/rstudio/r-versions", sep = " ", header = FALSE)

libs_list <- data %>%
  filter(V1 == "Library:") %>%
  transmute(lib = V2)
  
repo_list <- data %>%
  filter(V1 == "Repo:") %>%
  transmute(repo = V2)

for (i in 1:nrow(libs_list)) {
  lib_tgt <- libs_list$lib[i]
  repo_tgt <- repo_list$repo[i]
  print(paste(i,lib_tgt, repo_tgt))
  install.packages(pkg_tgt, lib = lib_tgt, repos = repo_tgt)
}

We have multiple Linux servers that we seek to maintain parallel R environments for with each R environment having a 'primary' set of preloaded and verified functional R packages. When we determine that a package should be added to our 'primary' list of packages, we go through this process of installing these packages in all of the R environments.

Thank you for any suggestions on how we can do this better.