How can I use drush pm_update and exclude some folders? For example, I don't want to update Sites and Profiles folders.


If you want to update Drupal core without updating contrib, use drush pm-update drupal. Always upgrade a copy of your site and test it before modifying your production site.

If you want to avoid updating just a specific contrib project, use drush pm-update --lock=skipthis. The lock is persistent until removed with --unlock.

  • But can I use lock to exclude some directories? For example: drush pm-update --lock=sites,profiles Or this is only working for modules?
    – Pilar
    Jan 22 '13 at 9:57
  • The --lock feature only works at the project level. drush pm-update drupal will only update Drupal, it will not touch contrib modules or profiles. If you want to be extra careful, always explicitly name the project you want to update on the commandline (e.g. drush pm-update views). Jan 23 '13 at 4:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.