Skip to content

Ubuntu Package Update and Upgrade

  • by

To refresh the list of packages that need to be updated in Ubuntu, a simple command gets the trick done:

sudo apt-get update

Once you run this command to the terminal, it should run through all the repositories that you have listed in your file: /etc/apt/sources.list file.

Note: To view this file type: sudo vi /etc/apt/sources.list, which will open the file in an editor. However, you can also open this file in your own editor if you have one via ftp (ie. Notepad++)

Note 2: If there are any errors when you run the above command sudo apt-get update, that are identified by a failed to fetch or jmp error, you’ll want to identify the line of code it corresponds to in your sources.list file. To hopefully correct this issue, you’ll need to find a mirror you can access that’s supposed to be close to your server. An Official Archive Mirrors for Ubuntu comes in quite handy here.

Note 3: It is necessary to identify the current codename for your Ubuntu version, so you’ll want to run the command:

sudo lsb_releaseĀ -a

More on that command here.

Now, once you’ve updated the packages your Ubuntu instance is using, we are ready to upgrade the packages needing updating.

To perform this, run the command:

sudo apt-get upgrade

Upon the terminal, all the packages should get run through, updating the ones that need to, which should be reported at the end of the update.


Leave a Reply

Your email address will not be published. Required fields are marked *

16 − ten =