How to delete license key on Mac?

I need to return my macbook to my friend and just delete unity-iphone cannot delete the registered license key if re-install.

How can I delete the license key on Mac?

technically you can’t. But you can prevent him from using it unless he knows your license key:

go to the Macintosh HD/application support and delete the pace anti-piracy folder
that will remove it. just be aware that you can’t void the installation like this, its still an activated maschine, you would need to request the deactivation from the support and mention the machines name and other things so ensure to keep notes on that stuff