-1

I am using Ubuntu 16.04.1 LTS on my seedbox dedi setup which has full root access, as I ssh into my system I now see a message with over 100 package updates can be updated none of them are security.

As I have moved from windows when the system needed to update it just done it, do I have to enter this command I read about to upgrade every time I want to? plus is sudo command only used for root systems?

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

2 Answers2

0

Yes, or use the Updates "app", same result in the end.

Starting in 16.04 apt is preferred instead of apt-get.

In order to do a full update you should also use full-upgrade instead of upgrade. The modern equivalent of the joined commands you posted is therefore:

sudo apt update && sudo apt full-upgrade

sudo is required to elevate privileges.

0

If you want this done automatically you can determine on what schedule you want it done and include the commands in a [cron job][1] script. Then call the script /full/path/to/script via cron.

I would use:

sudo apt update
sudo apt upgrade

as the full-upgrade switch will remove packages if it's deemed necessary and this may not be something you want done automatically.

Here's an excerpt:

upgrade (apt-get(8))
           upgrade is used to install available upgrades of all packages
           currently installed on the system from the sources configured via
           sources.list(5). New packages will be installed if required to
           statisfy dependencies, but existing packages will never be removed.
           If an upgrade for a package requires the remove of an installed
           package the upgrade for this package isn't performed.

       full-upgrade (apt-get(8))
           full-upgrade performs the function of upgrade but will remove
           currently installed packages if this is needed to upgrade the
           system as a whole.

Sources:

man apt

How do I set up a Cron job?

Elder Geek
  • 36,023
  • 25
  • 98
  • 183