Before cleaning, you should analyze the disk space usage and find out what is taking up space on Mac. Here is a guide on all questions related to the Mac disk.
It’s easy to clear the internet history of Safari on the iOS device. All you need is to go to Settings → Safari → Clear History and Data and confirm the option.