If you look at the jarsigner tool and what it does, it generates 3 things: 1) .SF file (signature file) 2) signature block file based on the algorithm used (e.g. .RSA, .DSA, etc.), 3 ) changing or creating the MANIFEST.MF file
Summary: For "unsign a jar", simply delete the first 2 files (.sf and .dsa / rsa FILE). Delete the MANIFEST.MF file or open it and delete all the hashes listed for each .class and other files listed there).
So, if you delete EVERYTHING in the META-INF directory, you risk deleting other banks resources that may be required (for example, property files, etc.). This "shotgun approach" to remove everything that "looks like a signature" is harmful, and does not follow the principle: 1st do no harm (for your .jar).
see here: https://docs.oracle.com/javase/8/docs/technotes/tools/windows/jarsigner.html
https://docs.oracle.com/javase/tutorial/deployment/jar/intro.html
Understanding Signature and Verification
"... When you sign a JAR file, your public key is archived along with the corresponding certificate so that it is easily accessible for use by anyone who wants to verify your signature .... Digests and signature file
When you sign a JAR file, each file in the archive is assigned a digest entry in the archive manifest. Here is an example of what this entry looks like:
Name: test / classes / ClassOne.class SHA1 digest: TD1GZt8G11dXY2p4olSZPc5Rj64 =
When the JAR file is signed, the signature file is automatically created and placed in the JAR metadata directory of the META-INF file, the same directory that contains the archive manifest. Signature files have file names with the extension .SF.
Signature Block File
In addition to the signature file, the signature block file is automatically placed in the META-INF directory when the JAR file is signed. Unlike a manifest file or a signature file, signature block files are not human readable.
The signature block file contains two elements necessary for verification:
Digital signature for the JAR file that was created using the private key of the signer. A certificate containing the public key of the subscriber, which will be used by anyone who wants to verify the signed JAR file. Typically, the names of the signature block files will have the extension .DSA indicating that they were created using the default digital signature algorithm. Other file name extensions are possible if keys associated with some other standard algorithm are used for signing.