Reversing Patches

You can reverse a patch if you're done testing it, or if you want to see whether a problem has been introduced by a particular patch. You should also reverse a patch prior to adding a newer, updated version of the same patch. To reverse the patch, use the patch command with the -R option:

patch -p0 -R < path/file.patch