Remove applied patch using patch command

23 10 2009

Today I am doing patch review of drupal7. I tested one patch, Now I want to remove this patch and go back to previous latest version of drupal. Unfortunately there is no cvs revert command which revert the files like in svn, bazaar, git etc..

I used same patch command to revert the applied patch.

I used following command to revert.

patch -p0 -R < patch_file_path.patch

In the above command -R option Assume patches were created with old and new files swapped. So it do the reverse operation of patch.

Advertisements