pm-update (alias: up)

drush up

In order to show how this works, I'm going to go ahead and uninstall Devel, then install and enable old versions of the Devel, Token and pathauto modules.

  • drush dis devel -y
  • drush pm-uninstall devel -y
  • drush dl devel-7.x-1.2 pathauto-7.x-1.1 token-7.x-1.4 -y
  • drush en devel pathauto token -y

Now, we can check for available updates

  • drush up -n | grep available

And since there are three updates available (and we know that Devel will require a database update), we can simply run "drush up" to update the modules, and database all at once.

When that's complete, you'll see that the modules were updated and the database was updated as well. One other line in there that you might have noticed states that "'all' cache was cleared". Let's take a look at how we can clear the cache ourselves.