How do I delete all the WhatsApp chat history and logs from my Mac but keep them on my iPhone which is linked with my Mac?
WhatsApp can be used on a Mac either using the macOS app or using Web app running on any modern Web browser.
Unlike the mobile app, in the desktop app the chat history is not stored locally on computer and is fetched from the WhatsApp servers. In-fact, the desktop app/Web app requires the mobile counterpart to be online in order to work.
To remove traces of any cached chat history from your desktop computer, simply log-out from WhatsApp macOS app or the Web App. You may also choose to uninstall the WhatsApp desktop client and clear Web browser history to ensure all the traces are removed.
The logout can also be performed from the within the WhatsApp mobile app if you don't have physical access to the desktop computer.