If I wanted to make a certain piece of software free and open source but don’t want certain companies (or their affiliates or partners) which are major privacy violators from using it is that possible to do?

Also is it possible to publish software and make the open source license terms irreversible to prevent any undesired company from trying to pressure the publisher into allowing them to use the software?

What software license type would best suit what I need to do?

  • 2
    The best defense for point 2 is to have many copyright holders (e.g. many contributors to an open-source project), as all copyright holders must agree to a license change. May 14, 2018 at 17:51
  • 1
    Pick a license that prevents "running away with the code", i.e., something asking for copyleft.
    – vonbrand
    May 16, 2018 at 17:12
  • It seems like the only way you could practically do this is to only give licenses to certain companies, or else somehow list all of the companies which you consider to be privacy disrespecting and then refuse to give a license to someone from such a company, or to state in the license terms that the person must not work for one of the listed companies and must not work for a company affiliated or partnered with one of the listed companies. Obviously this is very restrictive and is very far removed from free (as in freedom) or open source software.
    – Brandin
    May 23, 2018 at 14:55
  • @StevanWhite was my answer below helpful? opensource.stackexchange.com/a/6892/3844 May 30, 2018 at 5:25
  • 2
    Voting to re-open. The OP is asking for an open-source license, but with conditions that are incompatible with the open-source movement. That such a license can't exist shouldn't be a reason for closing the question. Nov 22, 2018 at 17:34

2 Answers 2


Restricting who can use your software is incompatible with the definitions of open source and free software, so any license you choose that restricts which kinds of entities may use your software would not be a FLOSS license. The Open Source Definition includes the following requirements and rationales:

5. No Discrimination Against Persons or Groups
The license must not discriminate against any person or group of persons.

Rationale: In order to get the maximum benefit from the process, the maximum diversity of persons and groups should be equally eligible to contribute to open sources. Therefore we forbid any open-source license from locking anybody out of the process.


6. No Discrimination Against Fields of Endeavor
The license must not restrict anyone from making use of the program in a specific field of endeavor. For example, it may not restrict the program from being used in a business, or from being used for genetic research.

Rationale: The major intention of this clause is to prohibit license traps that prevent open source from being used commercially. We want commercial users to join our community, not feel excluded from it.

For the second part of your question, you may offer your code under an explicitly irrevocable license like the GPLv3 or Apache 2. However, as the copyright holder, you always have the right to issue new licenses with different terms. If you wanted to prevent yourself from being talked into issuing a new license with different terms, probably the safest way to do this would be to perform a transfer of title of your copyright so you are no longer the copyright holder. (Or an analogous exclusive transfer of rights, if your jurisdiction does not directly allow copyright transfers.) In that case, only the new copyright holder could issue new licenses.

Optimally, you would chose an ethically rigorous organization (such as the FSF, or Free Software Conservancy, perhaps) as the new copyright holder who would respect your original wish not to issue different license grants. Which organization or individual you trust to do this would depend on your goals and original licensing terms. If you want non-FLOSS terms that restrict which kinds of entities may use your software, I would not expect any organization associated with free or open source software to be helpful in your case. However, if you used a GPL license and wanted to ensure you would not be talked into issuing a non-copyleft license in the future, the FSF might be cooperative and accept ownership of your copyright.

  • It would be nice to see some explanation of why it is not possible to restrict who, and be FLOSS. And some explanation of why this is in the definitions. May 18, 2018 at 16:57
  • @ctrl-alt-delor I originally tried to minimize details about that sub-question, since there's already a duplicate of it that I've linked to. However, since it really is as easy as quoting two items from the Annotated OSD, I've gone ahead and done so.
    – apsillers
    May 19, 2018 at 11:37
  • the real reason is freedom. I can not find a simple text to quote on this. Stallman has commented on the problems that restrictions have, non of which are about popularity. The OSI have created a back rational, because they like the consequences of free software, but don't like to be free. May 19, 2018 at 12:36
  • @ctrl-alt-delor The reason you can't deny a person, group, etc. is part of the definition of "Free" under the FLOSS definition of free. You can always deny a person, group, etc. the use of your software if you write the license to explicitly provide no provision for that person, group, etc. to use it; but, then the Free Software Foundation will not consider your software FLOSS, and if you try to use their popular terminology, either the market or their lawyers will eventually stop you. So, if it's not free for everyone, it's not Free as in FLOSS.
    – Edwin Buck
    Mar 22, 2022 at 14:40
  • @EdwinBuck There is no FLOSS definition. There is a Free Software definition, and an Open Source definition. However I was discussing one step back. I was discussing the philosophy that went into writing the definition. Mar 26, 2022 at 10:29

You have legal ownership (copyright) of any original software you write. That ownership gives you the right to restrict use of the software you write as you see fit.

As you choose the terms of your license:

  1. Take time to understand what people mean when they talk about the difference between “free beer and free speech”
  2. Take a look at the Creative Commons organizations’s article Understanding Free Cultural Works
  3. Consider License Compatibility
  4. Research the implications of choosing a “custom” license instead of a “standard” license that has been tested in court
  5. Get advice from a lawyer trained in software licenses, especially if you try to write your own license

As the Creative Commons organization explains, freedom is a spectrum. The license you seek to create/reuse is going to be considered “non-free” because it places a limit upon how people can reuse your software (their freedom). As others have written, a license that restricts fields of endeavor will not meet OSI’s definition of open source. However, your license will still be more free than most.

License Compatibility is extremely important to understand. Since you plan to restrict the freedom of people to reuse your software, other people’s code may not be able to include your code (and your code may not be able to include other people’s code). That will affect how people can use your software. Again, incompatibility isn’t good or bad it is just incompatibility. Many Free, Open Source licenses are incompatible.

Please Note: Creative Commons licenses are for written work other than software, like user manuals or documentation, so you’ll want to base your license on a license that is intended for software. I’ve used the “non-free” CC-NC license as an example because it is very well known and learning about it is likely to help you find (or create) a software-specific license you need.


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