I am trying to patch a linux 3.13.7 source tree to 3.13.8 using the patch-3.13.8.xz file. Since the patch file is in xz format, I used the following command to apply it while in the source tree:

unxz -cd ../patch-3.13.8.xz | patch -p1

But I receive:

Reversed (or previously applied) patch detected!  Assume -R? [n]

I have checked man patch for the -R flag and the description makes no sense to me. Can someone please explain what is going on and what I need to do to fix this?

  • 2
    That just means (probably) that the patch has already been applied. The man page says "If the first hunk of a patch fails, patch reverses the hunk to see if it can be applied that way. If it can, you are asked if you want to have the -R option set." In other words, you could apply the patch in reverse. Apr 1 '14 at 18:59
  • So instead of using unxz -cd ../patch-3.13.8.xz | patch -p1, I can put it in reverse mode with unxz -cd ../patch-3.13.8.xz | patch -p1 -R?
    – user133987
    Apr 1 '14 at 19:28
  • Well, no. You should investigate why the patch you are applying has already been applied. It's usually a sign something is wrong. Apr 1 '14 at 19:29
  • I have tries answering yes to all Reversed (or previously applied) patch detected! Assume -R? [n] questions and yet most seem to succeed, but some fail. I haven't actually compiled the source before in this particular tree so I guess it would be Ok to download the new linux 3.13.8 source tree anyway.
    – user133987
    Apr 1 '14 at 19:37
  • Yes, I should have said "why patch thinks the patch has already been applied". Programs can make mistakes. Apr 1 '14 at 19:38

When patching Linux kernel to the next minor version, you should use incremental patch. For your case, you should patch with patch-3.13.7-8.xz. This will patch your kernel source 3.13.7 to 3.13.8.


I think what may have happened is that the patch you had was to take an older (pre-3.13.7) version of linux to 3.13.8. When the patch program was run it found some of the changes to be applied were already present in your 3.13.7 source and raised the warning you saw. This situation has happened to me before and I saw the same symptoms, which is why I propose it.

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.