On iMac, either unlink OneDrive first or uninstall it completely.
If the goal is to stop using it without deleting files from OneDrive online:
- Click the OneDrive cloud icon in the Mac menu bar.
- Select Help & Settings > Preferences.
- Open the Account tab.
- Select Unlink this Mac.
If the goal is to remove the app from the iMac:
- Open Applications in Finder.
- Drag the OneDrive app to the Trash.
Important:
- Unlinking or uninstalling OneDrive does not delete files from OneDrive online.
- Files already kept offline on the Mac remain on the device.
- If the OneDrive folder is still present after unlinking and that folder is no longer needed, it can be deleted from Finder.
If Finder says the OneDrive folder is in use, fully quit OneDrive first:
- Click the OneDrive cloud icon.
- Choose Quit OneDrive.
- Then try deleting the folder again.