The App Store on your Mac allows you to do many more things than just letting you download new apps. One of these things it allows you to do is update old apps on your Mac.

If an update for an app installed on your Mac is available, then the App Store will let you know about it, and it will also offer you an option to update it. Clicking on it will update the app to the latest version available and all that happens inside the App Store on your Mac.

However, if you are more of a geek and you would like to do the task using the command line, then it is also possible. Thanks to Mas, you can now update the apps installed on your Mac right from the command line. All it requires is a command from your side, and it will get all the apps updated on your Mac.

Here’s how you can go about using that:

Installing Command Line Tools without Xcode

The first thing you need to have on your Mac before you can update apps from the command line is command line tools. These tools are usually downloaded when you install Xcode on your Mac, but in case you don’t have that installed on your Mac, then you will not have command line tools either on your machine.

There is actually a way to install command line tools without downloading and installing the huge Xcode setup. To do that, simply open Terminal on your Mac by clicking on Launchpad in the Dock and searching for and clicking on “Terminal.”

update-apps-terminal

When Terminal launches, type in the following command and press Enter. The command lets you download and install command line tools without installing the Xcode setup.

xcode-select --install

update-apps-xcode-tools

After you have executed the command, you will get a prompt in which you need to click on “Install, ” and it will begin to download and install the command line tools on your Mac.

The tools should now be installed on your Mac.

Installing Homebrew on Your Mac

After you have installed the command line tools with or without Xcode, you will need to install Homebrew on your Mac. Installing Homebrew is as easy as running a command using Terminal.

Launch Terminal on your Mac by clicking on Launchpad in the Dock and searching for and clicking on “Terminal.”

update-apps-terminal

Type in the following command into the Terminal window and press Enter.

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

update-apps-homebrew

Follow the on-screen instructions for installing Homebrew on your Mac. It should not take too long to do that and also ensure you have a stable Internet connection.

Homebrew should now be installed on your Mac.

Installing Mas utility on Your Mac

Now that you have installed the command line tools and Homebrew on your Mac, you now need to install the utility that helps you update apps from the command line on your Mac. You can install it using the following steps.

Open a Terminal window on your Mac as you would normally do.

When the window opens, type in the following command and press Enter.

brew install mas

update-apps-mas

Wait for it to install the Mas utility on your Mac. It will only take a few seconds to do that.

Once the utility has been installed, run the following command using Terminal, and you will get a list of all the apps that require updates.

mas outdated

update-apps-outdated

Now, to get all of these outdated apps updated to the latest versions, run the following command in Terminal and it will do all that for you.

mas upgrade

update-apps-upgrade

Wait for these apps to be updated to their latest versions. Depending on your Internet connection, it may take from a few minutes to a few hours to get all these apps updated.

Once the apps have been successfully updated, you can run the following command to see if everything went well and that all the apps are now in their latest versions.

mas outdated

So, that was how you could update apps from the command line on your Mac.

Related Tutorials