Sistema de blogs Diarium
Universidad de Salamanca
Pablo Gallardo's Blog
My professional web log about IT, Cybersecurity & Project Management

How to update and upgrade Ubuntu from terminal

This post explains how to update and install packages in Ubuntu from a terminal. It also explains how to perform a version upgrade.

apt-get and apt is the same command. We use apt in this post because is shorter.

To update the package source list or repositories, type this command:

sudo apt update

Take into account that the “update” command does not update the applications themselves, it just updates the package source list. This is why is convenient to run this command before installing an app or updating the existing apps in your system.

You may want to install “ffmpeg” and “ubuntu-restricted-extras” to be able to play YouTube videos.

If you need to install a package, type:

sudo apt install packagename

“packagename” is just an example but it could be the name of the corresponding package (for example, default-jre).

To update the applications already installed in your system, type:

sudo apt upgrade

To remove packages that are no longer needed because they are no longer used by apps (it may happen after application updates, when dependencies changes), type:

sudo apt autoremove

When Ubuntu releases a new version, you can upgrade it from command line by typing this on terminal:

sudo do-release-upgrade

You need to have the latest versions on all packages before being able to upgrade the system. So you may need to repeat many times the previous commands before being able to perform the upgrade.


External references


About pmgallardo

I studied Computer Science at University of Salamanca. Since then, I have been working first as developer and then as SAP consutant. This blog is about problems I dealt when using computers, and more important, the solutions I found. Whenever I am on an issue and suddenlly I have a flash that leads me to a solution, I document my discoveries in a post.

, , , , , , , , , , , , , , ,

No comments yet.

Leave a Reply


Política de privacidad
Studii Salmantini. Campus de excelencia internacional