How to perform MacBook Pro maintenance: an ultimate guide

Running a Mac is, on the whole, a hassle-free experience. Very rarely, things go wrong, but many users run their systems for years without so much as a hiccup. However, Macs are complex computers, which means they’re not immune to issues that affect performance, like bugs, erratic app behavior, and network issues. But you can prevent them by properly maintaining your Mac, just like you maintain your car.

Follow these routine MacBook Pro maintenance tips to prevent your system from running into trouble. These tips work for all Mac models.

How to perform Mac maintenance?

1. Learn how to back up your data

Backing up your data should always be a top priority. Macs are not indestructible; they are also not immune to malware, not to mention the risks of losing your computer. Therefore, if anything goes wrong, having a backup can save all of your hard work and precious photos.

Luckily for you, it is not difficult to back up your Mac since macOS has a built-in Time Machine that routinely backs up all of your files to an external storage device so they can easily be restored. 

To set up Time Machine, you’ll need to connect an external hard drive to your Mac. Once you’ve done that, scheduling backups is easy:

  1. From the Apple menu, select System Settings > General > Time Machine.
  2. Click Select Disk.
  3. Select your disk from the list, then click Use Disk. You may need to click Add Backup Disk and follow the on-screen instructions if you have not yet set up Time Machine on your Mac.
System Preferences - Time Machine

Time Machine will then start making hourly backups for the past 24 hours, daily backups for the past month, and weekly backups for all previous months.

2. Install MacBook maintenance app

The best way to ensure your system works flawlessfly is to invest in a Mac maintenance app. We recommend CleanMyMac X — it has a few other weapons in its arsenal to take care of maintenance.

Maintenance module lets you run regular optimization and diagnostic checkups for improved performance. It can run maintenance scripts, free up RAM, speed up Mail, reindex Spotlight, and perform many other Mac maintenance tasks.

    All of these tasks can be done in seconds, rather than the hours it would take to perform them manually. Here’s how it works:

    1. Open CleanMyMac X — available for download here
    2. Click Maintenance from the sidebar. 
    3. Select the tasks you want to perform and click Run. Easy!

    The best part? You can have CleanMyMac X run silently in the background and alert you to critical changes in memory, system load, and RAM. From an icon in the menu bar, you can use the CleanMyMac X Menu to perform maintenance tasks, such as RAM cleanup, in a single click.

    If you’re making maintenance part of your routine, you need this tool in your corner.

    3. Clean up junk files

    If you’re running a new macOS version, you can use Mac’s Optimized Storage feature. It erases Trash automatically, reduces clutter, optimizes storage by removing previously watched movies and TV shows, and moves certain files to iCloud.

    Tip: For smooth performance, you should aim to keep at least 10% of disk space free at all times. You can do this by regularly deleting junk files from your system.


    1. Open the main Apple menu > System Settings > General > Storage. 
    2. Check Recommendations under the colored bar.
    3. Browse through the categories under Recommendations and see if you can delete any files or application.
    System Preferences - Storage

    While it will help you free up space in a hurry, neither offers a comprehensive cleanup. Whenever you move an item to Trash, all you’re really doing is moving the main app or item file. Other associated junk like cache and preference files get left behind and sit on your disk hogging space.

    To permanently remove old files, you’ll need a cleaner app. CleanMyMac X we recommended above can perform a full junk cleanup. The tool is designed to run a deep scan of your system and detect any old, broken, or outdated files for full removal. Here’s how to use it:

    1. Open CleanMyMac X.
    2. Click System Junk > Scan.
    3. Now, you can either review files for deletion or click Clean right away. Worry not, the app selects only those files that can be safely removed.

    4. Declutter Mac desktop

    For every app, file, or screenshot on your desktop, Mac has to contribute RAM. So, the more things you have there, the more draining it is on system resources. Keep your desktop clutter-free by removing anything you don’t need and organizing items into folders.

    Try using the Stacks feature

    This originated on macOS Catalina. A simple organizer feature called Stacks. 

    1. Right-click on a blank space on your desktop.
    2. Click Use Stacks.

    Now, the contents of your Desktop will be grouped into folders.

    In the same menu, you’ll find Show View Options. There, you can specify the size of icons on your Desktop and stacks themselves.

    Wondering if there are other tips? Check out our guide to cleaning up your Mac desktop

    5. Keep Mac software updated

    Updating software keeps your system free of bugs and vulnerabilities. First, check for macOS updates: 

    1. Go to System Settings > General > Software Update. 
    2. If an update is available, click Update Now. 
    3. While you’re waiting for it to download, consider enabling automatic updates.

    Now, it’s time to update your apps. There are several ways to do it: 

    • For Mac App Store apps: Open the App Store. Click Updates > Update All.
      AppStore Updates tab
    • For non-App store apps: Open the app, click its name from the menu bar, and choose Check for Updates. 
    • Use CleanMyMac X and its Updater module — it lists updates for both App Store and non-App Store apps and lets you install them with one click.
    • Check the developer’s website if none of the above methods worked for you.

    6. Restart your Mac periodically

    By periodically restarting your Mac, you’ll be able to free up RAM, regenerate certain cache files, and rid the system of virtual memory swaps that Mac performs as you launch and quit apps. It’s like a fresh start for your computer.

    Restart your system every two weeks or whenever you experience a noticeable slowdown in performance.

    7. Check out Disk Utility

    If you are experiencing issues like file corruption, unexpected app closure, or external devices that don’t work correctly, you can run Disk Utility to repair the startup disk:

    1. Go to Finder > Applications > Utilities and open Disk Utility.
    2. Click View > Show All Devices.
    3. Select the disk you want to repair from the sidebar.
    4. Click First Aid > Run.
    Disk Utility window

    8. Scan for malware

    As we already mentioned, Macs are not immune to malware. So, it’s not even a question that you should install antivirus software on your system and periodically scan for malware. 

    If you don’t want to have a lot of third-party apps on your Mac, CleanMyMac X we recommended above is a great alternative to all antivirus software. In addition to maintenance and cleanup tools, its malware scanning module is every bit as effective as premium software, and periodic checkups will scan your system for adware, viruses, spyware, ransomware, cryptocurrency miners, worms, and more. 

    All you have to do is click Malware Removal > Scan and wait for the results. Anything detected can be removed at the click of the Remove button. If nothing has been detected, you’ll get a clean bill of health.

    If you’re interested in other trusted antimalware apps, check out our guide to the best Mac antivirus software.

    9. Regularly empty Mac Trash 

    You already know that deleting unnecessary files from your Mac is an effective way to manage it. However, when you send files to Trash, you do not delete them immediately. Instead, they are still there, occupying valuable space on your Mac’s drive. They can pile up and take up gigabytes, so it’s recommended to regularly empty Trash. 

    There are a few different ways to do it: 

    • Open Trash and click Empty Trash. 
    • Right-click Trash icon and select Empty Trash. 
    • Turn on automatic trash removal by going to Finder > Settings > Advanced and selecting Remove items from Trash after 30 days. 

    10. Manage your login items

    The final tip is to manage login items. These are apps that launch once you boot up your Mac. The main problem is that you may not even know that they constantly run in the background, but they consume your Mac’s resources, thus affecting its performance and slowing it down. 

    Therefore, it is a good idea to turn off those you do not need booting at startup. Here’s how: 

    1. From the main Apple menu, go to System Settings.
    2. Navigate to General > Login Items.
    3. Select a login item you do not need or want to boot at startup and click the “-” button. 
    4. Once there, turn off any apps you do not need or want running in the background. 
    System Preferences - Login Items

    What are maintenance scripts and how to run maintenance scripts on Mac?

    macOS has a built-in function to keep your system from getting bogged down with old files that are no longer needed. It is named maintenance scripts.

    There are three versions of these maintenance scripts: daily, weekly, and monthly. They handle clearing out different unnecessary files as well as some additional system upkeep like reporting network statistics and rebuilding the so-called locate and whatis databases. 

    Regular maintenance makes it easier to keep your Mac in top condition rather than trying to resolve issues once they’ve already taken hold. The easiest way to run maintenance scripts on Mac is to use a dedicated Mac optimization app since built-in tasks are not always performed automatically. 

    You can see Maintenance Scripts in action with CleanMyMac X:

    1. Open the app (it has a free version).
    2. Click Maintenance and select Run Maintenance Scripts.
    3. Click Run, and see how it affects your computer performance. 
    Maintenance Scripts in CleanMyMac X

    This should rotate certain system logs, rearrange libraries, and perform lots of other technical tasks known only to developers.

    How to check when maintenance scripts were last run

    Mac maintenance scripts run automatically at night if your computer has not been turned off. If you’d like to check if they were performed, you will need to use Terminal — a built-in command line tool.

    1. Open Terminal.
    2. Type ls -al / var/log/*.out — it’s important to enter the command exactly, including spaces. Like in the screenshot below, there should be spaces before and after -al and no space before /var
    3. Pressing Return will bring up a list of when (date and a time) a maintenance script was run and what type of script it was (daily, weekly, or monthly). If the scripts are running automatically, you will see timestamps for their default times (03:15, 04:30, or 05:30).

    If the logs show that your maintenance scripts haven’t been run for a while, it’s recommended that you run a script with CleanMyMac X or manually as outlined below.

    How to Run Maintenance Scripts through Terminal

    If you’re comfortable with using Terminal, you can use it to run maintenance scripts: 

    1. Open Terminal either through the Spotlight search or by navigating to the Utilities folder in Applications.
    2. Type sudo periodic daily weekly monthly and press Return.
    3. You will be asked to enter your administrator password. For security reasons, your password will not appear on the screen.
    4. Your Mac will then perform three maintenance scripts. There won’t be a status bar or percentage to show that the scripts are being run, but you’ll know they’re complete when Terminal prompt returns.

    If you only want to perform one maintenance — perhaps you’ve missed your monthly script or have limited time — you can edit the Terminal command to sudo periodic monthly and type it into Terminal.

    Note: you will need an administrator password to run maintenance scripts through Terminal.

    How to run maintenance scripts on macOS automatically using CleanMyMac

    If typing commands into Terminal seems a bit daunting, and you don’t want to go through all of the steps we outlined in this article, there is third-party software that can run a simple scan for you to clear out the junk, check for malware, and perform Mac maintenance — CleanMyMac X and its Smart Scan module. Just open the app and click Scan > Run, and your Mac will work as good as new.

    Laptop with CleanMyMac
    CleanMyMac X

    Your Mac. As good as new.