From System Preferences select Printers & Scanners.
double click the printer and select Printer Options.
Open the Utility tab and then press the Open Utility, within the HP Utility press on Clean Cartridges and follow the steps on screen.
Note: if no Utility tab appears, ensure you use the HP Driver and not AirPrint, click the plus sign and then and then select the printer, within the Use drop down menu select the printer model and not the AirPrint option.
If the printer model isn't listed as an option you will need to install the HP Software by following HP Easy Start below: