List Updatable/Upgradable Packages in Ubuntu Server

A little while ago I setup a GitLab box using Ubuntu Server. When I log in to the server it shows me a short message about available updates. The message looks something like this:

Welcome to Ubuntu 16.04 LTS (GNU/Linux 4.4.0-24-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

7 packages can be updated.
0 updates are security updates.

I know that I can update these packages by running `sudo apt-get update && sudo apt-get upgrade` however, I’d like to know what I’m updating before I do it. In the past you could accomplish this by performing a “dry-run” of the command. This essentially showed you the output of the command without actually performing any updates. That worked alright – but honestly, I just want a list of the packages – not the entire output of the command.

Listing the Upgradable Packages

I stumbled upon this answer (made just a few days ago) by AskUbuntu user “doru“. Turns out that getting a list of updatable/upgradable packages is pretty easy. You just run this:

sudo apt list --upgradable

The list --upgradable command will list out all the packages that you can update, what their current versions are, and what the new version is. Boom! That’s exactly what I wanted.

2 thoughts on “List Updatable/Upgradable Packages in Ubuntu Server”

  1. Hello Jeremy,

    my name is Tim and I came across your blog due to the article on the forced upgrade from Windows 8 to Windows 8.1. This happened to me yesterday and now my laptop is unusable. Since then I have been trying to contact MS to sort this out but they deny that such forced upgrade is even possible and accuse me of lying. As I am sick of this behaviour I want to file a law suit against them in Australia which is where I am. I was wondering whether it would be easy and free for you to provide a sworn, official statement regarding your own experience of the forced updating as I would then use that as evidence that I am not making it up and that it has happened to other people and that MS has known about it for years and yet have not fixed it. I would be grateful if you could contact me on my e-mail address. Thank you.

Leave a Reply

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