R-project: update the installed packages

This is a very simple post. However, I think it might be really useful.

If you are an R user (like me), you have surely installed several packages while you were writing scripts to analize and plot data.

However, have you ever though that maybe you should update each package after certain time?

Well, not me…until now!

To update each package you should simply type the following command in an R console:


This command offers to download and install each package which have a suitable new version on the repositories.

This command is part of utils package which makes available the following command as well (as reported in the inside-R web-page):


that indicates packages which have a suitable later version on the repositories, and it can be run before running update.packages() in order to check which packages you should update and:


that looks for suitable packages on the repositories that are not already installed, and optionally offers them for installation.

Happy R-programming, always up-to-date!

About Francesco Serafin

I am a PhD student at the Department of Civil, Environmental and Mechanical Engineering at the University of Trento. My two greatest loves: Computer Science and Water (take three with my Lenovo!:D). As a result, the aim of my life is to make both passions coexist. My gpg public key available at https://pgp.mit.edu

Leave a Reply

Your email address will not be published.