Quitting multiple processes in Activity Monitor

Normally, quitting a process in Activity Monitor is a one-step-at-a-time task. Is there an easy way to automate quitting a group, such as all “Safari Web Content (Cached)” processes? My guess is it might be possible with an Apple Script that says something like “tell Activity Monitor application if process name = Safari Web Content (Cached) then quit process,” but I don’t know Apple Script well enough. Or maybe there’s a better approach.


Why are you quitting processes in open apps? Are they somehow slowing your system or robbing it of RAM? Frankly, unless there was an overarching reason I’d just leave it alone.

I agree with bowline that you shouldn’t be doing this. Just close the app (Safari) to get rid of them. However I will mention that there is a command you can issue from the command line, killall, that will do what you want.

I’m doing it since recent versions of macOS don’t release memory when you close a Safari tab or window, but keep it cached (as shown above). I keep Activity Monitor open on my 8GB MacBook Air to keep an eye on Memory Used and Swap Used. When those get high, I want to shed things I don’t need. Closing apps is one step. I usually want to keep Safari running but free up the memory from tabs I’ve closed rather than quitting it, restarting, and reloading all the active tabs.

When I had limited RAM I’d use CleanMyMacX to ‘Free Up’ RAM intelligently, without needing to quit anything.

(I still have it installed but for other features it has.)

1 Like

These are really things that the OS takes care of automatically. In the case of the cached Safari pages, the OS may be putting off releasing that memory as it is more efficient to wait and not slow the system by doing so immediately when the windows/tabs close. When system load is low, or demand for RAM increases, it will take care of releasing the cached pages.

1 Like

Right in theory, but seems odd that the system would allow Swap Used to grow while leaving cached pages using real memory.

While nodding about this, I ran across the sudo purge command that seems to do what CleanMyMac’s freeup command does.
Never tried it, caveat emptor.

Thx; I’ll ck it out.