If you sign out of your Apple ID preferences on Mac

Before you sell or give away your Mac, make sure you sign out of your Apple ID on that Mac. When you do, your documents and data stored in iCloud are removed from your Mac. Your bookmarks and Reading List remain in Safari, but the iCloud Tabs list of web pages open on your other devices is no longer available.

You’re asked whether you want to keep copies on your Mac of documents stored in iCloud Drive and data stored in iCloud by Contacts, Calendar, Reminders and Messages. If you keep copies, iCloud doesn’t keep them up to date with changes on your other devices.

You’re also asked whether you want to download or remove photos and videos that aren’t fully downloaded from iCloud Photos to your Mac. After you sign out of iCloud in iCloud preferences, downloaded Photos and videos aren’t kept up to date with changes on your other devices.

Copy iCloud documents and data before signing out

Before signing out of iCloud, you can selectively copy or archive iCloud documents and data to your Mac.