Erase a Mac that you are giving to someone you know and trust. This will erase all of your content and links to iCloud, but will retain all of the software on your Mac. Licensing issues of non-Apple apps may be an issue. Some apps may still be tied to your AppleID.

The concept here is that we are going to create a new user on your Mac using the name of the recipient of your Mac. After that, we will log in as that user and delete your user on your Mac.

Use the Apple menu to open System Preferences and go to AppleID. If your Mac is older, you may have to use the iCloud icon. Once open, choose Overview on the left side and choose Sign Out. On older Macs, the Sign Out button will be on the main iCloud screen at the bottom. Follow the instructions to fully sign out of iCloud. Do not keep data on your Mac when it asks.

Next, go back to the main System Preferences page and choose Users and Groups. Click the padlock in the lower left to unlock the page. Click the + sign in the lower left to create a new user. Make it an Admin user and give it the new owner’s name and a password. Create the account.

Next, go to the Apple menu > Log Out [your user account]. Log in as the new user, then back to System Preferences > Users & Groups. Click the padlock to unlock the page. Choose your user name on the left, then click ‘-‘ to remove the user. This deletes all of your files. Choose Delete Home Folder when it asks.

Finally, restart the Mac and verify that it only asks for the new owner’s name as a login option (and maybe Guest if that is enabled). Your Mac is ready for you to give away!