Categories
Device

How to update or install mac app store software from the terminal

Justin Pot has been writing about technology for over a decade, with work appearing in Digital Trends, The Next Web, Lifehacker, MakeUseOf, and the Zapier Blog. He also runs the Hillsboro Signal, a volunteer-driven local news outlet he founded. Read more.

How to update or install mac app store software from the terminal

Tired of opening the Mac App Store to install macOS updates? Use the Terminal instead.

The Mac App Store is slow, especially on older Macs. Even on newer Macs, the store is kind of annoying to use for updates. That’s why we showed you how to update or install Mac App Store software from the Terminal, but sadly that method doesn’t let you update macOS itself.

Don’t worry! It turns out there’s a built-in method for downloading macOS updates from the Terminal, and it’s not that hard to use. Here’s a quick tutorial.

List and Install macOS Updates From the Terminal

Open the Terminal, which you can find using the Finder by heading to Applications > Utilities. Next, type softwareupdate -l at the prompt and hit Return. This command lists all available updates on your system.

How to update or install mac app store software from the terminal

Downloading and installing all available updates is simple: just use the command softwareupdate -i -a and you’re set.

How to update or install mac app store software from the terminal

You can use your computer while the download is happening, which is nice. Eventually you’ll be asked to restart your computer.

How to update or install mac app store software from the terminal

Do this to finish the installation. Wasn’t that easy?

A quick note: if you’d prefer to install only one of the available updates, you can: just use the command softwareupdate -i followed by the exact name of the update in single quotes. We found this method frustrating, but it’s there for you when you don’t want to install everything all at once.

Download macOS Updates From the Terminal Without Installing

There’s no way, in the Mac App Store, to download an update manually without also triggering the installation. That’s annoying, but you can work around this using the Terminal.

First, list all the available updates using softwareupdate -l , like we did above.

You can download all of these updates without installing them using the command softwareupdate -d -a .

How to update or install mac app store software from the terminal

After downloading, you can install updates from the Mac App Store, if you want: you’ll get to skip the download step. You can also use the installation terminal commands we covered in the previous section.

Of course the Terminal isn’t for everyone. If all of this sounds like way too much work, you can control when macOS updates are installed using the macOS settings.

Justin Pot has been writing about technology for over a decade, with work appearing in Digital Trends, The Next Web, Lifehacker, MakeUseOf, and the Zapier Blog. He also runs the Hillsboro Signal, a volunteer-driven local news outlet he founded. Read more.

How to update or install mac app store software from the terminal

Tired of opening the Mac App Store to install macOS updates? Use the Terminal instead.

The Mac App Store is slow, especially on older Macs. Even on newer Macs, the store is kind of annoying to use for updates. That’s why we showed you how to update or install Mac App Store software from the Terminal, but sadly that method doesn’t let you update macOS itself.

Don’t worry! It turns out there’s a built-in method for downloading macOS updates from the Terminal, and it’s not that hard to use. Here’s a quick tutorial.

List and Install macOS Updates From the Terminal

Open the Terminal, which you can find using the Finder by heading to Applications > Utilities. Next, type softwareupdate -l at the prompt and hit Return. This command lists all available updates on your system.

How to update or install mac app store software from the terminal

Downloading and installing all available updates is simple: just use the command softwareupdate -i -a and you’re set.

How to update or install mac app store software from the terminal

You can use your computer while the download is happening, which is nice. Eventually you’ll be asked to restart your computer.

How to update or install mac app store software from the terminal

Do this to finish the installation. Wasn’t that easy?

A quick note: if you’d prefer to install only one of the available updates, you can: just use the command softwareupdate -i followed by the exact name of the update in single quotes. We found this method frustrating, but it’s there for you when you don’t want to install everything all at once.

Download macOS Updates From the Terminal Without Installing

There’s no way, in the Mac App Store, to download an update manually without also triggering the installation. That’s annoying, but you can work around this using the Terminal.

First, list all the available updates using softwareupdate -l , like we did above.

You can download all of these updates without installing them using the command softwareupdate -d -a .

How to update or install mac app store software from the terminal

After downloading, you can install updates from the Mac App Store, if you want: you’ll get to skip the download step. You can also use the installation terminal commands we covered in the previous section.

Of course the Terminal isn’t for everyone. If all of this sounds like way too much work, you can control when macOS updates are installed using the macOS settings.

Want to update Mac OS software from the Terminal? You can check for available updates, ignore packages, and install any or all Mac OS X Software Updates directly from the command line.

To see what updates are available for a Mac, or to install a software update from the Terminal of Mac OS X, amongst many other options including how to ignore particular updates, you’ll use the ‘softwareupdate’ command line tool as we’ll instruct below.

Read on to learn about using the command line software update utility on the Mac.

How to Check For & Install Mac OS Software Updates from the Command Line

We’ll break this down into a few sections. First we’ll show you how to check for available software updates and get a list of all available Mac software updates from the command line. Then we’ll show you how to install software updates from the command line, including installing all updates, recommended updates, or a specific update.

As this is using the command line, you will be using the Terminal application, found in /Applications/Utilities/ on all Macs. If you’re unfamiliar with the command line, it’s probably better to simply install software updates from the Software Update system preference or the Mac App Store.

List All Available Mac Software Updates from Command Line

To get a list of available software updates, type the following command in the Terminal:

You will see a list of available updates.

Installing All Available Mac OS Software Updates from Terminal

You can then install all available software updates with the following command:

sudo softwareupdate -iva

The use of sudo is required to get superuser privileges to actually install the updates.

Install Recommended Updates Only from Terminal in Mac OS X

You can also install only the recommended updates with:

sudo softwareupdate -irv

How to update or install mac app store software from the terminal

Installing Specific Software Updates to Mac from Terminal of Mac OS X

You can also just install specific software updates by specifying the shorthand package name from the previous list retrieved from the softwareupdate tool, just point the command at a particular package and make sure the syntax matches up like so:

sudo softwareupdate -i iPhoneConfigurationUtility-3.2

We’ve discussed different but similar approaches to installing specific software updates this way before in the past, so this may be familiar to you already.

How to Ignore Specific Software Updates from Terminal in Mac OS X

If there are any available software updates you want to ignore, you can do so with the –ignore flag, pointed at the package you want to ignore, for example:

sudo softwareupdate –ignore iWeb3.0.2-3.0.2

What other software update commands are available in Terminal?

If you want to see all the available command line options for Software Update, just type:

Hit Return and you’ll see many other options for command line based software updates to MacOS, including how to set and clear the softwareupdate catalog, download but not install, cancel downloads, install, ignore, reset the ignore list, verbose mode, suspend options, pull logs from the softwareupdate daemon, and more, with the following output showing all options:

** Catalog Management:
–set-catalog Set the new catalog URL (requires privileges)
–clear-catalog Clear the catalog URL back to defaults (requires privileges)

** Manage Updates:
-l | –list List all appropriate update labels (options: –no-scan)
-d | –download Download Only
-e | –cancel-download Cancel a download
-i | –install Install
(label) … specific updates
-a | –all All appropriate updates
-r | –recommended Only recommended updates
–background Trigger a background scan and update operation
–ignore (label) … Ignore specific updates
–reset-ignored Clear all ignored updates

** Other Tools:
–suspend-background (on | off) Suspend background operations from occurring temporarily (uses –duration)
–duration (duration)) Optional duration in seconds to suspend background operations (defaults to 5*60 seconds)
–dump-state Log the internal state of the SU daemon to /var/log/install.log
** Options:
–no-scan Do not scan when listing or installing updates (use available updates previously scanned)

-v | –verbose Enable verbose output
-h | –help Print this help

Optionally, you can use the softwareupdate man page:

The command line approach to software updates is really useful for remotely updating Macs with ssh, setting up automated updates via a bash script, or if you just want to geek out.

This tool is available in all versions of Mac OS X and macOS and therefore it can be used to update just about any Mac with necessary software updates.

This is one way to avoid using the Mac App Store to update a Mac if that is necessary for whatever reason. Another would be to use Combo Updates for updating Mac system software, or getting other packages from Apple via the Support Downloads page.

If you have any other tips or tricks for command line softwareupdate in Mac OS, share them in the comments below!

Justin Pot has been writing about technology for over a decade, with work appearing in Digital Trends, The Next Web, Lifehacker, MakeUseOf, and the Zapier Blog. He also runs the Hillsboro Signal, a volunteer-driven local news outlet he founded. Read more.

How to update or install mac app store software from the terminal

There’s no getting around it: the Mac App Store is slow. If you try to avoid opening it whenever possible, you’re probably pretty annoyed when you see the update notification in the menu bar. You’ve got to open the App Store, click the “Updates” button, and wait while the application is “Checking for Updates.”

It’s checking. For updates. Which it already did, because it just told you about how many updates you have. Ugh.

This is why you should manage your App Store purchases from the Terminal instead. A free program called mas (stands for “Mac App Store”) lets you quickly check for and install updates, in moments. You can also quickly search for software, and even install things that you’ve already purchased. Let’s set it up now, so you never have to see “Checking for Updates” ever again.

Installing mas

We’ve shown you how to install Mac software with Homebrew, and that’s the easiest way to get started with mas. Our advice: set up Homebrew before you get started, using our instructions.

Once Homebrew is installed, head to the Terminal, which you can find in Applications > Utilities. Type brew install mas , then hit Return. In a few moments mas will be installed; you’re now ready to upgrade your software from the Mac App Store.

If you’d rather not set up Homebrew, check the mas page on Github for build instructions. Seriously, though: just use Homebrew. It’s a lot easier, and if you like using the Terminal, chance are you’ll come across it again in the future.

How Update Software Without Launching the Mac App Store

The biggest use for this software, in my opinion, is installing updates. To see a list of apps that need updates, type mas outdated and hit Return. It will present a list of apps that need updating.

How to update or install mac app store software from the terminal

To update everything listed, just type mas upgrade and hit return.

How to update or install mac app store software from the terminal

That’s it: your upgrades are now installed. Head to the Mac App Store if you don’t believe me—it won’t find any updates for you.

If you want to upgrade only one application, you can do that too. Let’s look again at the output from mas outdated :

How to update or install mac app store software from the terminal

See how there’s a number before the name of the application? Copy that number, and paste it at the end of mas oudated to upgrade only that program.

How to Search for and Install Software Without Launching the Mac App Store

If you’re not sure whether a particular application is in the App Store or not, you can quickly search the entire store by typing mas search followed by what you’re looking for, then hitting Return.

How to update or install mac app store software from the terminal

You can even install software you find this way, by typing mas install followed by the number of the corresponding app from the search results.

Note that you can only install applications that you “purchased” inside the Mac App Store. Sadly, this includes free applications. For this reason the “install” functionality is less useful than it could be, but it’s still a quick way to install software you know that you’ve already purchased.

Other mas Commands You Should Know

If you want a list of every Mac App Store application currently installed on your system, simply type mas list then hit Return.

How to update or install mac app store software from the terminal

You can also sign into the Mac App Store, if you’ve never done so, with the command mas signin followed by the email address associated with your account. To sign out, you can use mas signout .

And that’s about it! This tool won’t let you avoid the Mac App Store entirely, but it can make your visits a lot less frequent, and that’s a great thing. If nothing else, it will be how I install updates from now on.

How to update or install mac app store software from the terminalIf you’re sick of waiting for the progress bar to complete every time you reboot after a macOS software update, then you’ll be pleased to learn there’s another way to update your Mac that could potentially reduce your downtime.

The process involves a simple Terminal command, and allows you to continue using your Mac as the update downloads and the initial software installation takes place in the background. In our tests, we found that this method was capable of shaving off several minutes of idle time during installation restarts, but that the time-saving depends on the machine and the update in question.

Users with older Macs in particular will likely appreciate this tip, as it saves having to fire up the Mac App Store altogether, which can be slow-going and sometimes even downright unresponsive. Read on to find out how it’s done.

How to Update macOS From the Command Line

Before following these steps, ensure you have a full backup of your system, which should be par for the course when performing any update. Note that the following procedure only lists stock Apple system updates (iTunes, Photos, printer drivers the like), but not updates for other Apple apps that aren’t installed with macOS (Xcode, for instance), and not third-party updates from the Mac App Store.

    To update macOS from the command line, first launch Terminal, which can be found in the Applications/Utilities folder. This will open a Terminal window and a command prompt for you to begin typing.
    How to update or install mac app store software from the terminal

Input the following command and press Enter: softwareupdate -l
How to update or install mac app store software from the terminal

  • Wait as your Mac searches Apple’s servers for any macOS software updates currently available for your system. If no updates are available, you’ll be returned to the command prompt.
  • Now let’s take a look at the command’s output. Available updates always appear as items in a list. In our example, only one update is available at this time, but every item follows the same format, as shown:

    How to update or install mac app store software from the terminal
    The asterisked line denotes the individual software update package that’s available for your Mac to download. This line is also known as the identifier.

    How to update or install mac app store software from the terminal
    The second line offers a more detailed description of the update, including the version number (usually in brackets) and the download file size in kilobytes. [Recommended] means the update is recommended for all users, and [restart] indicates that your Mac needs to reboot for installation to complete.

    To download and install a specific update in the list, use the following format, but replacing NAME with the update’s identifier:

    softwareupdate -i NAME

    softwareupdate –install NAME

    Note that if the package name you’re trying to install has spaces in it, you’ll need to enclose the whole thing in single quotes. So for example:

    softwareupdate –install ‘macOS High Sierra 10.13.3 Supplemental Update-‘

    Also, be alert for spaces at the end of the package names. If present, they also need to be included within the quotes.

    Moving on, to download a specific update for your system without also installing it then and there, you can use:

    softwareupdate -d NAME

    Updates downloaded in this way can be subsequently installed with the same -i or –install command above, or even through the Mac App Store. These updates are downloaded to a folder located in /Library/Updates, but they aren’t designed to be installed by double-clicking the packages in that directory. You’ll need to use the –install command or visit the Mac App Store to actually initiate the install.

    Lastly, to download and install all available updates for your system, type the command:

    softwareupdate -i -a

    Using these commands, you’ll be able to leave the update to download and continue to install in the background while you get on with other things. All being well, Terminal will eventually prompt you to restart your machine manually so that the full installation procedure can complete. (Note that the softwareupdate utility requires admin authentication for all commands except the -l or -list command. If you run softwareupdate as a normal admin user, you will be prompted for a password where required.)

    How to update or install mac app store software from the terminal
    As some users will no doubt be aware, there are several additional options that can be used in conjunction with the softwareupdate utility. For example, -schedule on/off enables/disables your Mac’s scheduled background check for updates. More adventurous readers can use man softwareupdate and softwareupdate -h for a summary list of commands.

    App Store отслеживает наличие обновлений для приложений, которые Вы приобрели со своим Apple ID.

    Как только появится обновление, Вы получите уведомление. Кроме того, на значке App Store в Dock и в разделе «Обновления» в боковом меню отображается количество доступных обновлений.

    Обновление из App Store

    Обновление в панели «Обновления». Нажмите «Обновления» в боковом меню и выполните одно из следующих действий.

    Обновление всех приложений. Нажмите «Обновить все».

    Обновление отдельных приложений. Нажмите «Обновить» напротив значка каждого приложения, которое требуется обновить.

    Обновление из разделов «Обзор», «Творчество», «Работа», «Игры», «Разработка» и «Категории». Нажмите кнопку «Обновить» рядом с приложением.

    Обновление из меню Apple

    На компьютере Mac выберите пункт меню «Apple»

    и проверьте, есть ли доступные обновления.

    Количество доступных обновлений отображается справа от пункта «App Store» в меню.

    Для загрузки обновлений выберите App Store.

    После того как App Store откроется, нажмите «Обновления» в боковом меню.

    Обновление из уведомления

    Можно загрузить и установить обновление приложения, не открывая App Store.

    Получив уведомление о доступном обновлении приложения, нажмите «Установить». (Можно также нажать «Закрыть», чтобы пропустить уведомление.)

    Автоматическое обновление приложений

    Обновления приложений можно загружать и устанавливать автоматически.

    В App Store на компьютере Mac выберите App Store > «Настройки».

    Is there an official way provided by Apple or a workaround so that I can install or update Mac App Store apps through Terminal?

    How to update or install mac app store software from the terminal

    How to update or install mac app store software from the terminal

    2 Answers 2

    Note: This will only work on machines with an OS prior to macOS 10.7

    There is a commandline app called softwareupdate that you have to run as root.

    sudo softwareupdate –list for example will give you the list of apps that are set to update. You can then run sudo softwareupdate –install

    This won’t let you install a new application that you haven’t already downloaded though.

    Until recently, the answer was no but there are open source efforts to replicate the Mac App Store in a command-line based tool:

    Once it’s in, you could update all the apps that are available with:

    If you don’t like this tool, you could also use MDM tools to package an already downloaded application and distribute it internally. Examples are Casper Suite, sftp, rsync, etc. and side load these apps. You do need to use the GUI or the mas tool to get the first copy of the application, however. So, if you already have the app, you can file share it over, but you can’t get the App updated or installed solely from the terminal.

    In a nutshell – you would set up an MDM server (there are now open source options) like:

    Then you would make your own App Store app that’s amenable to command line updates. For that munki is a nice open-source choice:

    From there you could package the app updates and server them side loaded or use the InstallApplication MDM command to trigger an app install or update. Do note, that if you are pulling the app or the update from Apple’s servers – you still need the user to enter their Apple ID and password in the prompt that OS X provides for the update. This does bypass opening the App Store app so it’s a partial win, I suppose.

    At present, the command line can only list software updates that come through the App Store the same as the previous Software Update server was used to download system updates and updates to apps that came on physical media. Terminal is not able to update apps that were bought electronically through the Mac App Store. Only some Apple apps are included in the updates using the softwareupdate command.

    How to update or install mac app store software from the terminal

    How to update or install mac app store software from the terminal

    You can check for available updates, ignore packages, and install any or all Mac OS X Software Updates directly from the command line.

    To see what updates are available, or to install a software update from the Terminal of OS X, you’ll use the ‘softwareupdate’ command as we’ll instruct in this post.

    Check and Install Mac OS X Software Updates from the Terminal

    To get a list of available software updates, type the following command:

    You will see a list of available updates.

    Installing All Available Updates from Terminal

    You can then install all available software updates with the following command:

    The use of sudo is required to get superuser privileges to actually install the updates.

    Install Recommended Updates Only from Terminal in OS X

    You can also install only the recommended updates with:

    Installing & Ignoring Specific Software Updates to Mac from Terminal of OS X

    Or you can just install specific software updates by specifying the shorthand package name from the previous list, like so:

    If there are any updates you want to ignore, you can do so with the –ignore flag, for example:

    If you want to see all the available command line shortcuts for Software Update, just type:

    This is really useful for remotely updating Macs, setting up automated updates via a bash script, or if you just want to geek out.

    This tool is available in all versions of OS X and therefore it can be used to update just about any Mac with necessary software updates.

    This is one way to avoid using the Mac App Store to update a Mac if that is necessary for whatever reason.

    How to update or install mac app store software from the terminal

    Xcode is the tool developers use to build apps for the Apple ecosystem – MacOS, iOS, and all things Apple.

    This guide will walk you through how to successfully install Xcode onto your Mac, from start to finish.

    Here are some handy tips to know before you get started:

    • Xcode only runs on a mac. If you are on a PC, sadly you won’t be able to use Xcode.
    • You’ll need a good, stable internet connection. The latest version is around 8 gigabytes in size.
    • Be sure to have at least 30 gigabytes of free space on your computer. The latest .xip file (v11.4.1 at the time of writing) is

    8 gigabytes zipped. When you unzip it, that’s another 17 gigabytes. Then you’ll need the command line tool, which is yet another 1.5 gigabytes.

    Here’s an overview of the steps to install Xcode

    1. Download Xcode
    2. Install the command line tool
    3. Open the new version
    4. Delete files

    Note that I have listed some Terminal commands in the steps below. These commands can be typed into your present working directory. This means that you don’t need to navigate to any particular folder.

    If you really want to, you can first type cd before typing the commands in the below steps. This will return you back to the home folder.

    Step #1: Download Xcode

    There are two ways to do this. For the latest version and a theoretically “easy” installation, you can use the App Store. I don’t recommend this option.

    I prefer to use the developer site. This comes with the bonus option of being able to download any version you’d like.

    Option #1: Download via the App Store for the latest version (not my preferred option)

    In theory, this should be a seamless and pain-free process. But if the installation fails for any reason on the last step, it is very hard to troubleshoot.

    There are a few reasons for failure, and no easy way to know which is the underlying cause. If you do encounter a failure, you will need to re-download the entire file again each time you try to fix the failure. As the latest version is 8 gigabytes, I didn’t much enjoy this approach.

    But if you’re feeling brave, here are the steps:

    • Open the App Store on your mac
    • Sign in
    • Search for Xcode
    • Click install or update

    Option 2: Download via the Developer site for a specific version (my preferred option)

    Step #2: Install the command line tool (CLT)

    If you have multiple users on your computer, you will need to update the CLT for each user.

    Download .dmg

    How to update or install mac app store software from the terminalA screenshot of https://developer.apple.com/download/more/

    To update the CLT, go to app developer website and download the command line tool .dmg .

    If you have never installed Xcode before, you may be able to update with your Terminal by typing in xcode-select –install instead of visiting the developer website.

    But if you have an existing version of Xcode installed on your machine, you’ll probably see this error:

    This means you’ll need to go to the developer website instead.

    Installing the CLT

    When the .dmg has finished downloaded, double click the file to open it. This will open a little window that looks like this:

    How to update or install mac app store software from the terminal

    Double click the box and follow the prompts to install the CLT. It will take a few minutes to complete.

    It may ask you at the end of the installation whether you want to move this to the trash bin. When it does this, it’s talking about moving the .dmg file to the trash bin. Since you should no longer need this file. I always say yes to this.

    Step #3: Open Xcode

    Open the Applications folder and open the new version of Xcode. If you renamed Xcode, make sure you open the correct application

    Xcode may prompt you to install additional components. Click install. This will take a few minutes.

    How to update or install mac app store software from the terminal

    While it’s installing, check that your default Xcode version is the one you just downloaded:

    • Open Terminal
    • Type brew config
    • You should see “CLT” and “Xcode” versions, as well as everything else. This should reflect the version that you have just downloaded. In my case, I downloaded Xcode 11.4.1.

    Once the components are installed, Xcode will launch. You should be able to pick up your old projects and continue where you left off seamlessly*.

    *Note that if you use any proxy tools, such as Charles, you will need to re-install those certificates in your simulator again.

    If you encounter any errors while trying to build or run a project, check which device you are trying to launch. The new version may not remember the device you were using before. If so, click on the device and choose “Add additional simulators” from the drop down menu to add the device you want.

    Step #4. Delete the files

    If you don’t need the older versions of Xcode on your computer, you can uninstall them and get some hard drive space back.

    You can also delete the .xip file of the version you just downloaded, as well as the CLT.dmg file.

    That’s everything. I hope this has helped you successfully install Xcode. Have fun with it!

    I’m an iOS developer, helping millennials with their finances through US neo-bank, Empower. Before making the switch to development, I was a strategist and GM in the tech space.

    If you read this far, tweet to the author to show them you care. Tweet a thanks

    Learn to code for free. freeCodeCamp’s open source curriculum has helped more than 40,000 people get jobs as developers. Get started

    freeCodeCamp is a donor-supported tax-exempt 501(c)(3) nonprofit organization (United States Federal Tax Identification Number: 82-0779546)

    Our mission: to help people learn to code for free. We accomplish this by creating thousands of videos, articles, and interactive coding lessons – all freely available to the public. We also have thousands of freeCodeCamp study groups around the world.

    Donations to freeCodeCamp go toward our education initiatives and help pay for servers, services, and staff.