• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
ControlUp Community

ControlUp Community

Connect, Learn, and Grow

  • Blog
  • Archives
  • Findings
  • Meetups
  • Videos
  • Events
  • Categories
    • ControlUp One Platform
    • ControlUp for Apps
    • ControlUp for Compliance
    • ControlUp Dashboards
    • ControlUp for Desktops
    • ControlUp for VDI
    • ControlUp Scripts & Triggers
    • ControlUp Synthetic Monitoring
    • ControlUp Workflows
  • Topics
    • Logos & Wallpaper
    • ControlUp.com
  • Join

How to Implement Native macOS and Windows Self-Service Disk Cleanup via ControlUp Edge DX Without External Tools

Posted on July 6, 2026

A ControlUp community member developed a native self-service disk cleanup solution for macOS and Windows users, designed to be triggered via ControlUp Edge DX without requiring IT intervention or external tools. The goal was to allow users to safely free disk space through a simple, native dialog that displays current disk usage and offers a checklist of safe-to-clean areas such as Trash, application caches, container caches, logs, Xcode build cache, and old temporary files. Each item is described in plain language and sorted by the space it occupies, allowing users to select and confirm the cleanup themselves.

On macOS, the dialog is implemented using only built-in osascript capabilities—no additional tools like swiftDialog or extra installations are necessary. For both macOS and Windows, the solution emphasizes safety by running a dry-run by default, excluding critical system folders and personal directories such as Documents, Downloads, Keychains, and SSH keys from cleanup. The cleanup operates within the context of the logged-in user, not root, ensuring user-specific data protection. After cleanup, the system verifies the amount of space reclaimed against the actual free volume.

Triggering this cleanup from an Edge DX alert, either automatically due to disk usage thresholds or on-demand, enables a small dashboard that reports on reclaimable and freed disk space, all without requiring elevated permissions, Intune writes, or admin consent. One of the more challenging technical aspects was delivering the cleanup dialog from a root-level agent into the user’s session, given the restrictions of macOS and Windows environments.

The community member shared that while the script could likely be optimized or shortened by more experienced developers, this version works reliably and safely. Detailed setup documentation is available by request. Additionally, to complement the cleanup tool, the developer created an analytics dashboard to track the cumulative space saved by the script. This solution offers a practical way for organizations using ControlUp Edge DX to empower their end users with safe, controlled disk cleanup capabilities, minimizing helpdesk workload without compromising disk security or user privacy.

For more on creating and managing custom alerts and actions within ControlUp Edge DX, consult the official documentation at https://docs.controlup.com/edge and explore ControlUp Academy at https://cuacademy.controlup.com for training on extending ControlUp functionality.

Read the entire ‘How to Implement Native macOS and Windows Self-Service Disk Cleanup via ControlUp Edge DX Without External Tools’ thread below:

A native macOS and Windows self-service disk cleanup for ControlUp Edge DX (no external tools)

Hi all,

spent last week on something I am a little proud of…

The idea: let Mac and Windows users clean their own disk, triggered from ControlUp, with no IT hands-on and no external tooling. Sounds simple. Then you try it on macOS and Windwos.
What I ended up with: a native dialog pops on the user’s Mac / Windows, shows how full the disk is, and offers a checklist of safe areas. Trash, app caches, container caches, logs, Xcode build cache, old temp files.
Each line says in plain words what it is and how much space it holds, biggest first. Tick, confirm, done. All drawn with plain osascript. No swiftDialog, no installs, nothing that is not already on every Mac.

The part I care about most is safety. Dry-run by default. A hard guard that blocks system folders and anything personal, Documents, Downloads, Keychains, ssh keys. It cleans the logged-in user, not root. And the freed number is verified against the real volume.
Triggered by an Edge DX alert on disk usage or on demand, with a small dashboard for reclaimable and freed space. Zero external permissions. No Intune write, no admin consent.

Honest read: getting a dialog from a root agent into the user’s session is where macOS / Windows makes you work. And yes, I lost an hour to a single apostrophe.
I am sure there are smarter brains here who would solve this in half the lines. If that is you, show me please. This is just my version, and it works.

Setup notes in a separate doc, happy to share (drop me a DM please )

Best,

Séb

P.S.: Oh, and because I love Analytics (yeah, I know, I am a weirdo…), attached a dashboard which reflects the saved space by this script.


You are the best!!! LOVE THIS! 🙂 Danke!!!


I am not, but thank you anyway


Bitteschön!!

Continue reading and comment on the thread ‘How to Implement Native macOS and Windows Self-Service Disk Cleanup via ControlUp Edge DX Without External Tools’.  Not a member? Join Here!


Categories: All Archives, ControlUp Dashboards, ControlUp for Desktops, ControlUp Scripts & Triggers
Topics: Automation & Alerting, ControlUp Agent, ControlUp Solve, Logs, Microsoft Intune, Microsoft Windows, Physical Desktops, Reporting, Scripts, Security, Triggers

Ask Us Anything, Connect, Learn, and Grow with the ControlUp Community!

Login to the ControlUp Community to ask us anything, stay up-to-date on what’s new and coming soon and meet other like-minded techies like you.

Not already a member? Join Today!

Primary Sidebar

ControlUp Academy

Enroll in ControlUp Academy for expert-led technical training, equipping you with skills to effectively deploy, manage, and grow your ControlUp investment.

Learn here >

Rotating Images

Hidden Gem from our Community on Slack!

ControlUp Betas - What's Coming Next?
NEW ControlUp Features - Stay Up-to-Date!
ControlUp Scripts - Scripting, Zero to Hero
Latest KB Articles - Be the First to Learn

Video Tutorials Library

Visit our technical how-to videos, offering step-by-step tutorials on advanced features, troubleshooting, and best practices.

Watch here >

ControlUp Blog

Check out the ControlUp blog for expert advice and in-depth analysis.

Read here >

ControlUp Script Library

Visit the ControlUp technical script library, which offers a multitude of pre-built scripts and custom actions for your monitoring and troubleshooting requirements.

See here >

ControlUp Support

Visit the ControlUp support home and to delve deeper into ControlUp DEX solutions.

Browse here >

Footer

      

ControlUp Community
Of Techie, By Techie, For Techie!

Terms of Use | Privacy Policy | Security
Dive Deeper, Learn more at ControlUp.com

  • facebook
  • twitter
  • youtube
  • linkedin

© 2023–2026 ControlUp Technologies LTD, All Rights Reserved.

We use cookies to ensure that we give you the best experience on our website. by continuing to use this site you agree to our Cookie policy..