Often we are bringing with us errors and wasting space on our precious hard drives, the thing that personally is wasting more space on my hard drive are pictures and iTunes, I put them on an external hard drive, there's the other article that talks about that, but just to have an idea of where we are wasting the space there are a lot of free apps for mac to figure it out, I like a lot , GRAND PERSPECTIVE it's a really old program but still, it gives you an idea of where your heavy stuff is. After the computer scans your able to see in blocks where your big stuff is and you can even show it in the finder. The other way is to use the find option on every mac and add constrains such as look for all the files bigger than 1GB.
On iPhones and iPads the thing that bothers the most is the iCloud space that some people is not able to manage and the material space that can be seen from settings →general→usage→manage storage, it gives you an idea of what sucks your space.Then you want to go to delete caches and apps that you don't use anymore, I highly recommend to always turn off any iCloud option or Dropbox option regarding picture upload, also be careful on jailbroken devices that your jailbreak partition will suck up to 700 MB so if the counts are not matching you need to subtract the jb partition that your original part of device can not see.
If your hard drive space is over and you have no external hard drive with you and you don't want to delete any file you can use this trick, your mac saves a file called "SLEEPIMAGE" into your computer that is used only to restart your computer after sleeping in the same configuration you left it. This file usually is big same as the RAM installed on your machine, so if you have 8GB or 16GB Ram on your mac you will have this file wasting space. You can remove it from your computer so that you will be able to use it and it will be created back as soon as there will be space. To remove this file the easiest way is to execute this script into terminal.app:
IF YOU ARE SKEPTIC ABOUT TERMINAL YOU CAN VISUALIZE THE FILE USING THE SAME PATH: