Even if there were such a spell, you would be going into very unethical behavior to use it on someone. That knowledge you're wanting to erase isn't yours; it belongs to the person in whose mind it is now located. To erase it would be theft, a violation of that person's inner self. Do you really think you have a right to do that?
If you told your friend this information, it is now hers.