So I've forked a (declared by the owner) unmaintained Node.JS project on GitHub which uses the Apache License, version 2 in the package.json only:

"license": "Apache-2.0"

However there are no license headers in any source code files which to my knowledge of Apache License, version 2 is required. What do I need to do if I want to edit any of these files? Is this Apache licensing valid? And if not, can I remove it?

  • If is not valid, you can remove the note, but what for?. I'd think it's valid, but can't tell an answer.
    – 13042
    Sep 18, 2019 at 9:16
  • The licensing isn't perfectly valid as per Brandin's quote on clause 4.
    – 13042
    Sep 18, 2019 at 11:55
  • 1
    @john As I understand it, the redistribution was not according to the Apache License. Nevertheless, I fail to understand how that affect the validity of the licensing. The original author may do "whatever he wants" to code he/she owns, e.g. distribute it without adding the Apache 2.0 License copy. Sep 18, 2019 at 19:20

2 Answers 2


For the Apache license, one requirement of the license is that recipients of the work receive a copy of the license:

  1. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:

    You must give any other recipients of the Work or Derivative Works a copy of this License; and ...

If you did not receive a copy of the license, then I would argue that based on the license itself, it is not a valid way to license a work under the Apache 2.0 license. If all you received was a file called package.json that contained a line such as

"license": "Apache-2.0"

Then this does not fulfill the above requirement ("you must give any other recipients of the Work or Derivative Works a copy of this license"). Based on the license itself, this is not a valid way to license a work under the Apache License.

What do i need to do if i want to edit any of these files?

You need to get a valid license. If you have communicated with the author and he has actually told you that the license is valid, that it is indeed under the Apache-2.0 license, then perhaps that would be sufficient. But in this case, to redistribute the work under that license you would need bring the files in a state that follows the requirements listed in the Apache license under "Redistribution". In particular, you would need to give any other recipients of the Work or Derivative Works a copy of the Apahce 2.0 license. You would also need to follow all of the other requirements of section 4 of the Apache license. For example, you must indicate which files you changed:

b. You must cause any modified files to carry prominent notices stating that You changed the files; ...

See: Apache License 2.0

  • I changed the accepted answer to this one as it's more useful, and answers the question better
    – Yamboy1
    Sep 18, 2019 at 12:45
  • @Yamboy1: That teaches you shouldn't press the accept button too soon. Sep 18, 2019 at 12:50
  • Obviously, the original author failed to follow the procedures set forth by the Apache License on how to redistribute the project. The act of GitHub distributing it might thus be non-conforming (but I assume that the GitHub TOS allows them to distribute the stuff you upload in public repos without following conditions as the one you qutoe). I do not agree that this means the product is not validly licensed. There is a single unambigous license declaration, so I don't understand how redistribution might be problematic, as long as I adhere to the Apache license and add the license copy. Sep 18, 2019 at 19:16
  • @MichaelKarcher Yes if the author licensed it that way (which is probably the intention here), it is arguably still a valid license, even if he himself (since he is the author) didn't follow that procedure (though it would be a strange oversight on his part). For example if the author actually said in plain language "Feel free to use all source code under the Apache 2.0 license" I would be willing to accept that and add the Apache license for redistribution. But in this case all we've apparently got is a two word JSON string "license": "Apache-2.0" which is not enough in my opinion.
    – Brandin
    Sep 18, 2019 at 20:46

Is the apache license valid? And if not, can I remove it?

If the license is deemed invalid, then you have no rights at all to make any changes to the project. Also removing the only indication which license the project is presumably licensed under will make it hard to prove that you had the right to make changes.

The best course of action is to get in touch with the (old) owner of the project to get a clear, written, statement under which license the project is released. If that license is an open-source license, add the appropriate LICENSE file to the project and license comments to the source files.

When the license state of the project has been clarified in that way, you can do further maintenance on it.

  • Are license comments in source files required for an apache license?
    – Yamboy1
    Sep 18, 2019 at 11:12
  • 2
    @Yamboy1 See section 4 of the Apache license for the requirements to redistribute code under that license. You do not need to add any comments in source files, but you do need to "retain" any existing copyright notices.
    – Brandin
    Sep 18, 2019 at 11:23
  • @Yamboy1 find here there is an official guideline on how to apply the license, but as Brandin implicitly writes, there's no need to follow that guideline, as being out of the license itself.
    – 13042
    Sep 18, 2019 at 11:53
  • @Yamboy1, license comments are not required, but they are a good practice. It helps making the licensing state clear if for some reason the LICENSE file gets dropped while copying some files. Sep 18, 2019 at 12:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.