Commands to update Ubuntu apt-get update or apt update sem get?

Asked

Viewed 49,314 times

6

In the company we received the instruction to run the following commands every morning, but the current project manager did not know how to answer me the reason and in the internet search I did not get a good response.

sudo apt-get update
sudo apt update
sudo apt-get upgrade
sudo apt upgrade

Another detail that caught my attention is that it does not have a sequence to be executed, will like the developer.

The machine is used to develop front-end but the lines that update with the commands I see nothing of npm, gulp, bower or php, which are the applications we use, so what’s the impact of running these commands.

2 answers

9


The command apt-get update updates the list of packages and programs that can be installed on the machine.

The command apt-get upgrade updates the system and downloads and installs package and machine program updates.

I do not know if it is necessary to run the 2 every day, since it is unlikely that you have programs that receive updates every day.

  • And the apt update and apt upgrade without the use of get follow the same rule or have different characteristics?

  • On my machine I saw no difference between the 2 commands ( with and without "get"), both executed the same thing.

  • There is still the sudo apt list --upgradable to see who these packages are that can be upgraded

7

the command:

sudo apt update

It is an "update" of the command:

sudo apt-get update

No longer need to type "-get".

You can execute only the command:

sudo apt update && sudo apt upgrade

So you don’t have to wait for the answer of one command to execute the other.

  • 1

    I know that the sudo apt-get update updates the package list and installs the latest version. I may be wrong, but I get it. It is safe to run apt-get upgrade always? Won’t that break something? Mainly what does it work for with development, Apache, PHP, Laravel, etc...?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.