How To Update/Upgrade Ubuntu 16.04

Step 1: Upgrade / Update installed packages

1.1 Update installed packages

sudo apt-get update -y
steken@ubuntu:~$ sudo apt-get update -y
Hit:1 xenial InRelease
Hit:2 xenial-updates InRelease
Hit:3 xenial-backports InRelease
Get:4 xenial-security InRelease [107 kB]
Fetched 107 kB in 0s (149 kB/s)
Reading package lists... Done

1.2 Upgrade installed packages to the latest versions

sudo apt-get upgrade -y
Setting up overlayroot (0.27ubuntu1.6) ...
Setting up intel-microcode (3.20180807a.0ubuntu0.16.04.1) ...
update-initramfs: deferring update (trigger activated)
intel-microcode: microcode will be updated at next boot
Processing triggers for initramfs-tools (0.122ubuntu8.13) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-131-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
Setting up ubuntu-server (1.361.2) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...

1.3 Update dependencies

sudo apt-get dist-upgrade -y
Setting up linux-image-generic ( ...
Setting up linux-headers-4.4.0-138 (4.4.0-138.164) ...
Setting up linux-headers-4.4.0-138-generic (4.4.0-138.164) ...
Setting up linux-headers-generic ( ...
Setting up linux-generic ( ...

1.4 Auto-remove old files

sudo apt-get autoremove
steken@ubuntu:~$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

1.5 Reboot

sudo reboot