Power users - run apps with higher privileges on the Mac

Apple MacBook

Running apps in standard mode on the Apple Mac is fine and is recommended, most of the time. However, for certain tasks it can be beneficial to raise the privileges to gain more power. Here’s how to do it using OmniDiskSweeper.

I have looked at OmniDiskSweeper before and have shown how this free utility can be used to track down where all the disk space is used on your Mac. It is a file browser, not unlike Finder in columns view, but the advantage is that it sorts folders and files by size.

Using OmniDiskSweeper you can find the biggest files using the most disk space. You might discover files that you no longer use, yet are occupying a lot of space. You could delete those big files and regain the lost space.

It is essential to keep an eye on disk usage if you have a small SSD in your Mac because it is easily used up. As the free space falls, the Mac may slow down.

OmniDiskSweeper scans the disk and lists the files and folders. The problem is that some disk locations are out of bounds and it is not allowed to access them. The resulting picture of the state of the disk drive is therefore not accurate and it is missing information.

If you really want to find out what is using all the disk space you have to raise the privileges of the app so that it can access hidden and system areas.

If you have dabbled with the Terminal you might be aware of the sudo command to run commands as root. This does not work with apps, but there is a way around the problem.

Download OmniDiskSweeper, double click the dmg file to open it and drag the app to the Applications folder to install it.

OmniDiskSweeper for Apple Mac

An app on the Apple Mac looks like a single file with the .app extension, but it isn’t. In fact, it is a folder that contains other files and folders. Right click the OmniDiskSweeper app and on the menu that appears, select Show Package Contents.

OmniDiskSweeper for Mac

The Finder window shows the contents of the app folder. Expand the folders and find OmniDiskSweeper. It’s in the Contents/MacOS folder.

Finder on the Apple Mac

After locating OmniDiskSweeper, we need to open a Terminal window. Go to the Applications folder, open the Utilities folder and run Terminal.

In the Terminal window, type sudo followed by a space, then drag the OmniDiskSweeper app from the Finder window and drop it on the command line. This saves you having to type it in and avoids the possibility of mistakes.

The Terminal window should look like this:

Run an app from Terminal on the Mac

Press Enter and you are prompted for your administrator password (because of the sudo command). Enter it and OmniDiskSweeper runs.

OmniDiskSweeper shows the disk drives (or partitions) and asks you to select one. Click a disk and it is scanned. This takes several minutes so be patient.

The result when it has finished is like this:

OmniDiskSweeper for Mac

You can explore the disk folders, see which is biggest, find the files using all the disk space and so on.

It is useful to compare this to running OmniDiskSweeper in normal mode simply by clicking it in the Applications folder. I have highlighted the differences.

OmniDiskSweeper for Apple Mac

Notice that the System folder is much bigger when running OmniDiskSweeper with higher privileges from the Terminal (top screenshot). This is because it is able to show system files and folders that are normally inaccessible.

In the Users column is an account called janice. Notice in normal mode (bottom image) OmniDiskSweeper says janice uses 24.6 kB, but in the top screenshot running OmniDiskSweeper from the Terminal, it says 28.8 MB.

That is a huge difference and the reason is that OmniDiskSweeper cannot access the Janice account in normal mode, but it can when run from the Terminal.

There is no advantage to running most apps from the Terminal and it makes no difference to them. It does make a difference to tools like OmniDiskSweeper though. Use the same technique with other advanced tools to gain access to parts of the Mac they cannot normally reach.



Add new comment

By submitting this form, you accept the Mollom privacy policy.

Related items you will like...