Discard unneeded patches.