Automated Re-Install of Packages for R 3.0

April 3, 2013

(This article was first published on » R, and kindly contributed to R-bloggers)

With the big release of R 3.0 today comes an unfortunate side effect of needing to re-install all of your packages. Luckily, R provides a pretty easy method of getting all of your packages into a list for automated re-install.  Here’s how to do it for OSX users with a default install to the Library:

For Windows users, the same general process should work, assuming you change the file reference in the installed.packages function to the proper Windows location.

The one downside to this method is that only packages that are listed on CRAN will be reinstalled, so if you installed anything using devtools, you’ll need to re-install those packages again. But at the very least, the code snippet above is a quick way to re-install most of your packages.

EDIT, 4/4/13: Per Noam below, you can also use a more direct method:

update.packages(ask=FALSE, checkBuilt = TRUE)

Automated Re-Install of Packages for R 3.0 is an article from, a blog dedicated to helping newcomers to Web Analytics, with a heavy focus on WordPress self-hosted blogs and Google Analytics.

If you liked this post, please visit to read more. Or better yet, tell a friend…the best compliment is to share with others!

To leave a comment for the author, please follow the link and comment on their blog: » R. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)