How to update Ubuntu from terminal – using apt-get update. Update Ubuntu via the command line and [Ubuntu software update command line] – update Ubuntu using the Software Updater GUI tool.
Update Ubuntu Via The Command Line
In the terminal, you just have to use the following command:
sudo apt-get update
sudo apt-get upgrade -y
sudo apt clean
sudo apt autoremove
sudo reboot
It will ask for password and you can use your account’s password. You won’t see the anything on the screen while typing so keep on typing your password and hit enter.
Let us explain how the command ones: The command uses apt-get with the command updates “apt-get update” and “apt-get update”.
apt-get is the command-line tool for handling packages, and may be considered the user’s “back-end” to other tools using the APT library. Several “front-end” interfaces exist, such as synaptic and aptitude.
The command can use the following parameters and arguments:
- update – Used to re-synchronize the package index files from their sources. The indexes of available packages are fetched from the location(s) specified in /etc/apt/sources.list(5). An update should always be performed before an upgrade or dist-upgrade.
- -y, –yes, –assume-yes – Automatic yes to prompts. Assume “yes” as answer to all prompts and run non-interactively. If an undesirable situation, such as changing a held package or removing an essential package, occurs then apt-get will abort.
- upgrade – Used to install the newest versions of all packages currently installed on the system from the sources enumerated in /etc/apt/sources.list. Packages currently installed with new versions available are retrieved and upgraded; under no circumstances are currently installed packages removed, nor are packages that are not already installed retrieved and installed. New versions of currently installed packages that cannot be upgraded without changing the install status of another package will be left at their current version. An update must be performed first so that apt-get knows that new versions of packages are available.
- clean – Clears out the local repository of retrieved package files. It removes everything but the lock file from /var/cache/apt/archives/ and /var/cache/apt/archives/partial/.
- autoclean – Like clean, autoclean clears out the local repository of retrieved package files. The difference is that it only removes package files that can no longer be downloaded, and are largely useless. This allows a cache to be maintained over a long period of time without it growing out of control. The configuration option APT::Clean-Installed will prevent installed packages from being erased if it is set to off.
Update Ubuntu Using The Software Updater GUI Tool
- Open Ubuntu Dash and look for “Software Updater” and click and and run it.
- The updater will check if there are any updates available for the system.
- If any updates are available, it will give you the list of the updates and an options to install the respective updates.
- Click on “Install Now”. It will ask for the password.
- Once the password is typed, the system will start installing the updates {automatically}.
- After the update is installed you will be asked to reboot the system.
These are two methods to update the Ubuntu System.