Running the macOS maintenance scripts To run the maintenance scripts for macOS, run this Terminal command: sudo periodic daily weekly monthly