Skip to main content
Mole
Features Tested apps Testimonials Pricing FAQ Blog
EnglishEN 简体中文中 繁體中文繁 日本語日 한국어한 FrançaisFR DeutschDE ItalianoIT EspañolES
Buy nowBuy Download

    Help, documentation, releases, and articles.

    Home/Blog

    What Mole Optimize Does, Step by Step

    Apps & MaintenancePublished October 9, 20267 min read

    Mole’s Optimize page brings several kinds of Mac maintenance together. It can refresh input switching, reset file previews and deal with startup entries left behind after removing an app. Some actions also clear history or reset settings, so it helps to know what a run will change.

    This article follows Optimize in the Mole 1.16.0 Mac app; the command-line version works differently. Four service refreshes come first, followed by seventeen maintenance checks. Each later task has its own conditions and may not run every time.

    Mole Optimize flow: prepare to run, refresh four services, then prepare access if needed. Both available and unavailable access lead to seventeen checks in order. Ordinary tasks continue, administrator tasks need access, then results are shown.
    The four services are refreshed first. Later maintenance depends on its conditions; declining administrator authorization still allows ordinary tasks to continue.

    First, refresh four system services

    Mole waits for the operation lock if another task is running, then checks its license. It then attempts these refreshes in order:

    • Input switching: restarts the input-menu and switching processes. Switching input methods may briefly pause.
    • Spotlight: refreshes the search interface, keeping the search index.
    • Notification Center: refreshes its interface process. Notification history is kept at this step.
    • Universal Clipboard: refreshes the service used by Handoff, leaving the local clipboard and Handoff setting in place.

    Mole does this by terminating matching system processes and letting macOS restart them. If a process is absent or cannot be terminated, it is recorded as not refreshed. You still need to retry the original action to see whether the problem has gone away.

    Only after these four steps does Mole read the system state and prepare administrator access if needed. A management helper may already be configured, so a password is not requested on every run. If you decline, ordinary-permission maintenance continues; tasks needing administrator access cannot run.

    Reset previews and release memory when needed

    Next, Mole resets the Quick Look preview components, then the thumbnail cache, and attempts to delete three specified user thumbnail and icon caches. These actions use a system tool and are skipped if it is missing. The caches will be generated again later. With several locations involved, a completed result can still leave an individual cache uncleared.

    Memory caches are handled only when the check reports warning or critical memory pressure, and administrator access is required. Normal pressure skips the task. Released caches can fill again, and content may need to be read again; this step does not guarantee faster apps.

    Tidy history and databases

    Four kinds of content are checked here, in this order, using ordinary user permissions.

    • Download quarantine-event history: if the database exists, contains records and is not protected, Mole deletes all its event history and compacts it. Downloaded files, their quarantine attributes and Gatekeeper are kept.
    • Mail and Messages databases: compacted only when the owning app is closed, the database is below 100 MiB, integrity checks pass and at least 5% of its pages are free. Compaction removes unused database pages; mail and chat records are not deliberately deleted.
    • Shared file lists: Mole checks selected .sfl2 and .sfl3 files, keeping recent-document lists and protected system lists. A failed validation triggers an attempt to delete the list directly so macOS can recreate it. Its remembered contents can be lost. Timeouts and other validation errors also trigger removal, so the deleted lists are not necessarily proven to be damaged.
    • Old notifications: when the user notification database exceeds 50 MiB, Mole deletes records older than thirty days, compacts it and attempts another Notification Center refresh. Deleted notifications are no longer available.

    A database in use, or a read or write error, can prevent the operation from completing.

    Old rules, window state and startup entries

    Next come third-party Spotlight rules. Mole asks macOS to locate the related app and removes a rule if the lookup cannot find it, keeping Apple and system rules. This changes search preferences. It relies on the system lookup rather than searching every disk, and a missing lookup result does not prove the app was uninstalled.

    Saved window-state folders are judged by their modification date and deleted directly after thirty days. An app may forget window positions, layouts or session restoration. This task does not separately check whether the app is running.

    Broken user background startup entries go to Trash. Mole first requires an absolute program path, a mounted volume and a file proven to be missing; Apple and protected management or security software are excluded. Disconnected volumes, unclear paths and uncertain access leave the file in place. Moving the startup configuration does not stop an already-running service. Recovery requires the original file still to be in Trash.

    A readable third-party preference file that cannot be parsed, and is neither protected nor whitelisted, is deleted directly, without a backup or a Trash move. The app may revert to default settings. This task does not require the app to be closed; protected Apple, global and login-window preferences are kept.

    Open at Login entries require administrator access and may also request Automation permission. Mole removes an old entry only after confirming that its volume is mounted and the app at its stored location is missing, then reads the list again to confirm. Other background records that cannot be removed are only reported. Unknown or inaccessible locations are kept.

    Two older settings are also checked: disabling App Nap and skipping disk-image verification. If these overrides remain enabled, Mole removes their settings so macOS uses its defaults.

    Finish with disk images, command links and permissions

    Mounted disk images may be ejected, leaving the image file in place. Mole only attempts images reported as read-only, not flagged as encrypted and mounted under the user-volume directory; macOS-managed images are excluded. An absent encryption flag does not prove that an image is unencrypted. Unknown read/write status keeps the image mounted. A busy image can refuse ejection, and Mole does not force it. There is no age check, so a newly mounted image can also be handled.

    Mole then checks four fixed Homebrew and local-command directories for links whose targets cannot be found. It reports them and leaves the links in place; finding a problem is not counted as a completed repair. An unreadable directory can also produce no findings.

    If the home directory belongs to someone other than the current account, or the account cannot write to its Library, Mole uses the system tool to reset that account’s home-directory permissions. Ownership and access-control lists may change. This requires administrator access and concerns the current account; privacy permissions must be set separately.

    Finally, Mole checks macOS’s periodic maintenance. If the system tool exists and the daily-maintenance log is missing, its date cannot be determined or it is over seven days old, Mole runs the daily, weekly and monthly scripts with administrator access. Recent maintenance or a missing tool skips this task. The installed macOS scripts determine what it does.

    Afterward, try the original action again

    The result shows completed, skipped and failed tasks. A skip can mean nothing was needed, the task was whitelisted or access was restricted, so read the reason too. When a task handles several files, partial success can still be marked completed. A failure does not automatically undo changes made earlier.

    Cancelling stops later steps. A command or file batch already underway may keep going for a while, and deleted contents or changed settings are not restored automatically. A per-command timeout is not a time limit for the whole run.

    If you exclude tasks through the CLI Optimize whitelist, thirteen of the seventeen maintenance tasks read the corresponding configuration. The four service refreshes, both Quick Look resets, image ejection and command-link reporting are not controlled by that whitelist.

    Try the action that was failing: switch input methods, open a preview or copy between the same devices. A Mac running normally does not need daily Optimize runs. If it feels slow, check memory pressure and follow the maintenance guide. Virtual-machine disk reclaim belongs to the Clean page and has its own confirmation; it is not part of Optimize.

    Mac running low on space or slowing down? Mole can clean out the junk, remove apps completely and keep macOS in shape.

    Try Mole

    Keep reading

    • Apps & MaintenanceDo You Need a Mac Cleaner5 min read
    • Apps & MaintenanceMac Slow After a macOS Update? Find Out What Is Still Running3 min read
    • Apps & MaintenanceKeep Your Mac Awake While Using Less Battery5 min read

    Mole · 鼴

    Cleanup, software, and status for your Mac.

    v1.16.0 (308) · Release notes

    Product

    Mac Cleaner App Uninstaller Mac Optimizer Disk Analyzer System Monitor

    Support

    Help Documentation Releases Blog

    Legal

    Terms of Service Privacy Policy Refund Policy

    Resources

    CLI Tool Affiliate Program

    Connect

    Twitter hi@mole.fit

    Mole’s only official website mole.fit · Avoid installers from unknown sources

    The CLI stays free for terminal workflows.