install.packages( lib = lib <- .libPaths()[1], pkgs = as.data.frame(installed.packages(lib), stringsAsFactors=FALSE)$Package, type = 'source' )
https://www.r-bloggers.com/update-all-user-installed-r-packages-again/