Question: While [this](https://opensource.stackexchange.com/questions/657/what-am-i-supposed-to-do-if-someone-is-breaking-the-terms-of-my-licensed-softwar) question says what to do if *someone* is breaking the terms of a license, I am asking what do I do if *I* breaking the terms of an open source license?

I was using a piece of software and misread one of the terms of the agreement. I reread the license recently and noticed I am breaking one of the terms.

**My question:**

To fix this issue, could I just delete all the files I have used in relation to this program? Or should I contact the owner?

Answer: 
It depends on whether you have, in fact, distributed something to other people in violation of the license. If you have not, you almost certainly have not violated the license, just prepared to.

If you have, I can tell you what we would generally do at the Apache Foundation if we found that we had, by some accident, incorporated some inappropriately licensed content.

As soon as practical:

1. make a commit to the source repository to remove the inappropriate content.
2. make a release of the product that no longer contains the inappropriate content.
3. notify that the release(s) containing inappropriate content had the problem they had.
4. make it harder to download those releases.

What I don't think that we'd do is to edit history in source control to remove all traces; for a license which imposes restrictions on distribution (the usual situation with FLOSS), there's no sufficient reason to do that.
That depends on the license, but in the case of the GNU GPLv3, this is what it says about termination (sec. 8):

> 
> You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
> 
> 
> However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
> 
> 
> Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
> 
> 
> 

This means that you're usually *allowed* to fix the issue by doing whatever it takes to repair the violation after you've discovered your mistake. There are some other terms (depending on whether this is your first time transgression or not), but the gist is that a good-faith violation is repairable, and if you're able to repair, you can go on using the licensed materials.

The GPLv3 does *not* oblige you to inform the copyright holder (but other free software licenses may - read the license text).

If you're not able to repair (for instance, you're distributing GPL code as part of an unfree project), then you need to stop doing it, delete the files, issue a recall to your customers, and probably: hire a lawyer to help you sort out the mess.