Ubuntu packages can be managed by using command lines like apt or GUI tools like software updater such as for the updates. Keeping your system updated will help you protect your computer against vulnerabilities and intrusions.
This article will show you the different ways to update the packages of your Ubuntu system through command lines and GUI tools.
1) Update the packages using command line
The common way to update your packages on Linux system is the command line. On Ubuntu, it exists some the default command line package manager apt and some others like aptitude which are also useful. The packages manager help you to do some stuff like installing, removing or updating the packages, upgrading your system version and some others.
Apt is the default package manager installed on Ubuntu systems. Apt offers some options to update all the packages or specific packages on your system. The common first way to do is to update the cache of the packages with the command
# apt update Hit:1 http://ppa.launchpad.net/bitcoin/bitcoin/ubuntu xenial InRelease Hit:2 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu xenial InRelease Hit:3 http://ppa.launchpad.net/gwendal-lebihan-dev/hexchat-stable/ubuntu xenial InRelease Hit:4 http://ppa.launchpad.net/noobslab/themes/ubuntu xenial InRelease Hit:5 https://download.jitsi.org stable/ InRelease Hit:6 http://ppa.launchpad.net/ravefinity-project/ppa/ubuntu xenial InRelease
You can upgrade the packages installed in your system
# apt upgrade Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages will be upgraded: apt apt-transport-https apt-utils chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg-extra curl .... ....
You can need to install some additional updated packages that are important for the systems, this is done with the
# apt dist-upgrade
You can choose to upgrade only a specific package
# apt install --only-package chromium-browser Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: chromium-browser-l10n chromium-codecs-ffmpeg-extra Suggested packages: webaccounts-chromium-extension unity-chromium-extension adobe-flashplugin The following packages will be upgraded: chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg-extra 3 upgraded, 0 newly installed, 0 to remove and 47 not upgraded. Need to get 59.9 MB of archives. After this operation, 2,048 B disk space will be freed. Do you want to continue? [Y/n] y
You can also use the
apt install command to update a package that is already installed.
Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: chromium-browser-l10n chromium-codecs-ffmpeg-extra Suggested packages: webaccounts-chromium-extension unity-chromium-extension adobe-flashplugin The following packages will be upgraded: chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg-extra 3 upgraded, 0 newly installed, 0 to remove
You can see that it asks to automatically update the package when it's already installed.
You can also use aptitude to manage your packages on Ubuntu. You can update the list of the package with
# aptitude update Hit http://cm.archive.ubuntu.com/ubuntu xenial InRelease Get: 1 http://cm.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB] Get: 2 http://cm.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB] Hit http://dl.google.com/linux/chrome/deb stable Release Hit https://deb.nodesource.com/node_9.x xenial InRelease Hit https://download.jitsi.org stable/ InRelease
You can now upgrade all the installed packages with the
# aptitude safe-upgrade The following packages will be upgraded: apt apt-transport-https apt-utils chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg-extra curl distro-info-data dpkg dpkg-dev dselect friendly-recovery ghostscript ghostscript-x gir1.2-packagekitglib-1.0 google-chrome-stable
You can need to install packages that the safe-upgrade option can't do with the
# aptitude full-upgrade
2) Update packages using GUI tools
Besides command lines, you can use graphical tools to update the packages on your Ubuntu systems. Ubuntu comes with a default GUI package manager known as Software Updater.
To launch it, go to the dashboard
Then run it, it will look for all the packages which can be updated
You can see the details of the packages to update and choose those to upgrade.
You will be asked for your password to confirm the process.
3) Using Synaptic
This is a graphical front-end to apt. It combines the versatility of the Graphical user tool with the apt-get command line tool. With Synaptic, you can install, upgrade, update and remove software packages. you can also browse, search and sort available software packages, manage repositories and upgrade the entire system. Synaptic also gives you more information about Software dependencies and conflicts about other packages residing in the system.
You can install Synaptic using the CLI or via the built-in software center
To install using the CLI, login as root and run
# sudo apt-get install synaptic
To launch synaptic using on the terminal, run
Alternatively, you can search for the application on the GUI applications manager
Once launched, you'll catch a glimpse of Synaptic's dashboard as shown
As seen above, the main window is divided into 3 sections. On the left pane, there's a package browser, on the right, we have the package list and package details on the lower right.
To get more information about a package, right click on it and hit 'Properties'
Here, more info about the package will be displayed
Keeping your System up to date, including the kernel
To upgrade your system with Synaptic:
Click Reload or press Ctrl + R to make Synaptic aware of the available latest updates.
The repositories will be checked for the latest changes
After the repository is checked, Hit Mark all Upgrades or press Ctrl + G.
In the next Window, click on "Mark " to effect the changes to be made
Click Apply on the toolbar or press Ctrl + P. A dialog appears with a summary of the changes that will be made to your system.
Click Apply to confirm the changes and go ahead with the upgrade.
Now you know the different possibilities that you have to update them on Ubuntu. You can use the command interface as well as the graphical tool. Just choose the best method for you but it's really interesting to operate with the terminal.
- How to Manually Install Security Updates on Ubuntu 18.04
- How to List Packages Having Updates Available in Linux
- How to Find Packages Owns Specific File on Ubuntu
- How to Exclude Specific Package from apt-get Upgrade
- How to Install Specific Version of Package using apt-get