Tag Archives: apt-get

What does “apt-get upgrade -y” do?

What does “apt-get upgrade -y” / “sudo apt-get upgrade -y” do?

This command will upgrade all packages that have updates available and answer Yes (y) to the subsequent prompt (typically whether or not to continue after displaying the additional disk space that will be used)

Example:
After this operation, X kB/MB of additional disk space will be used.
Do you want to continue [Y/n]?
Will continue because the answer alreay provided is Y

Let’s examine each part of the command

sudo
execute a command as another user (typically root)

apt-get
a simple command line interface for downloading and installing packages

upgrade
Perform an upgrade

-y
Assume Yes to all subsequent queries and do not prompt

Adapted from my 12/10/13 post http://advancedmarketingllc.com/what-does-apt-get-upgrade-y-do/