pak icon indicating copy to clipboard operation
pak copied to clipboard

Automated install / Reinstall entire library

Open royfrancis opened this issue 2 years ago • 2 comments

I am wondering if there is a convenient way to reinstall an entire package library from a system to another system. I know that renv is used for this, but I want to avoid using that. I can see that pak::pkg_list() gives a data.frame of installed packages along with remote refs. Can this data.frame be passed to pak::pkg_install() or something and reinstall the same packages, versions and from same sources?

royfrancis avatar Jul 03 '23 11:07 royfrancis

It is not so simple because it might be impossible to tell where packages were installed from, they might not be available at the place they were installed from, etc.

If you use pkg_list() and you don't install packages from too many or too obscure sources, then you might be able to put something together.

gaborcsardi avatar Jul 03 '23 13:07 gaborcsardi

I agree that it might not be possible to install everything perfectly. It would still be nice to install what it can and print a list of uninstallable packages (#520). In fact, even before installation, it would be awesome if pkg_list() can be used to "check" what can and cannot be installed and give an overview.

royfrancis avatar Jul 03 '23 13:07 royfrancis