ObjectiveThe objective is to provide Ubuntu user with an information on how to update Ubuntu packages in order to keep Ubuntu system up to date.
This guide will provide you with instructions on how to update Ubuntu packages from the command line as well as to keep your software packages up to date using the graphical user interface.
Operating System and Software Versions
- Operating System: - Ubuntu 18.04 Bionic Beaver Linux
RequirementsPrivileged access to your Ubuntu System as root or via
sudocommand is required.
- # - requires given linux commands to be executed with root privileges either directly as a root user or by use of
- $ - requires given linux commands to be executed as a regular non-privileged user
IntroductionUnlike proprietary operating systems, Ubuntu as well as any Linux like operating system come with free of change software updates privilege for every user.
The standard Ubuntu releases are continuously supported for 9 months since the initial release date whereas Ubuntu LTS (long-term support) releases such us Ubuntu 18.04 are supported for duration of five years since the Initial release date ( 26.4.2018 ) for both the desktop and the server. During this time user can automatically or manual apply any security fixes and other critical updates to keep their Ubuntu system updated at all times.
Keeping your system updated will help you protect your computer against vulnerabilities that may be exploited by hackers' malicious software.
More information about the Ubuntu 18.04 update support cycle is shown below:
$ ubuntu-support-statusFor example the below image shows the status update support expiry of our currently installed Ubuntu 18.04 Bionic Beaver:
Update Ubuntu via Command LineDespite of the availability of Ubuntu Software Updates via the graphical user interface application, updating the Ubuntu system via the command line is the preferred way to keep you system up to date as it will provide you with more transparency and control.
To begin the Ubuntu update of your system first we need to update the packages index list. Open up terminal and enter:
$ sudo apt updateNext, we have the option to list all packages which are scheduled for update:
$ apt list --upgradableAt this stage we have an option to update individual packages using
apt install PACKAGE-NAMEor install update for all packages at once:
$ sudo apt upgradeAll done. Your Ubuntu system is now fully updated.
Kept Back PackagesDue to package dependency changes some of the packages might be kept back.
If this is this case you may now upgrade each kept back package individually using
apt install PACKAGE-NAMEcommand or update all kept back packages at once:
$ sudo apt dist-upgrade
No Longer Required PackagesDuring your initial system update some of the packages may become obsolete, hence are no longer required. To remove all no longer required packages execute:
$ sudo apt autoremove
Update Ubuntu via Graphical User InterfaceAlternative to Ubuntu system update via the command line is to perform Ubuntu update via the graphical user interface. To begin the Ubuntu update search the Activities menu for the