[solved] Ubuntu 21.04. Does apt update and apt upgrade work on all apps?

Newbie here. About 3 weeks ago I switched from Windows 10 to Ubuntu 21.04. Occasionally I do ‘sudo apt update’ and ‘sudo apt upgrade’. Does this update/upgrade all my apps? If not, how can I tell which apps are not getting updated/upgraded?

I want to keep all my apps up to date. I have installed a few snaps, flatpaks and appimages. I’ve also downloaded and and installed some .deb files.

1 Like

Someone will be along here shortly to correct me if I am wrong, but apt will only update/upgrade apps it installs. The apps that apt has access to is controlled by repositories listed under /etc/apt/sources With that being said, some distro’s have a gui package manager that works with flatpaks and snaps, but you’ll have to confirm that.

It’s my understanding that appimages and anything else installed outside of any package manager (apt or any gui package manager) will have to be updated manually.

When looking to install apps, I would suggest that you look to see if the application has a repo that can be added so that apt can manage the updates.

1 Like

Thanks @Mr_McBride and @astronautsupplier This helps a lot. With this info I think I can now make a list of the apps that apt and snap doesn’t handle, which is what I needed.

Could you mark this topic as resolved? Thanks.

Good info from @Mr_McBride and @astronautsupplier.

Here is the direct link to the Ubuntu documentation on updating packages:

Working with apt-get

Working with repositories

One additional piece of info that sometimes gets skipped over is that the version of an installed application is controlled by the repository.

Example: Inkscape

You see and hear the news about Inkscape version 1.1 being available. You want to use that version so you enter:

sudo apt-get update
sudo apt-get install inkscape

Then you get a response that says Inkscape version 0.92.5 “Your application is up to date” or something similar. Wait! It’s not up to date. Where’s version 1.1? This lag in application versioning occurs because your system is polling Inkscape through the standard repository and is not polling Inkscape directly.

In order to polling Inkscape directly, I have to add the Inkscape PPA (Personal Package Archive) to my list of repositories that I want to poll. Fortunately, the Inkscape website tells me how to do this:

sudo add-apt-repository ppa:inkscape.dev/stable-1.1
sudo apt-get update
sudo apt install inkscape

BOOM! I now have Inkscape 1.1.
I can see that this custom PPA has been added by looking at the contents of etc/apt/sources.list.d

ls -l /etc/apt/sources.list.d/ink*
-rw-r--r-- 1 root root 148 Aug  5 14:45 /etc/apt/sources.list.d/inkscape_dev-ubuntu-stable-1_1-focal.list

All of this versioning can be seen by looking at the results of the following command:

sudo apt-cache policy inkscape

which will now report:

inkscape:
  Installed: 1:1.1+202106031931+af4d65493e~ubuntu20.04.1
  Candidate: 1:1.1+202106031931+af4d65493e~ubuntu20.04.1
  Version table:
 *** 1:1.1+202106031931+af4d65493e~ubuntu20.04.1 500
        500 http://ppa.launchpad.net/inkscape.dev/stable-1.1/ubuntu focal/main amd64 Packages
        100 /var/lib/dpkg/status
     0.92.5-1ubuntu1.1 500
        500 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages
     0.92.5-1ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 Packages

You will almost never have to do this – but I’m letting you know because there might be that one package that you have to have as a most recent release.

2 Likes

Very thorough reply !!!

I think the only thing you left out is the step to install the key, via apt-key add -

Here’s a link that provides additional info:

If a repo requires a key, it’s generally listed with the instructions on how to their repo.

2 Likes

Hmm… To me this sounds like a bug in the Linux ecosystem if users are not made aware that they’re not getting the latest version. Makes me wonder if there’s a way to fix this. Some standardized system where the app devs have an easy way to automatically let the repos know the latest version of their app. And this info is automatically passed on to the users so there’s no confusion.

I’d also really like to see an app that can scan all my installed apps and notify me of the ones that require manual updating/upgrading.

This is because the teams that maintain the distributions repository work long and hard to test every package for security issues, compatibility issues, library dependency issues, etc.

2 Likes

That is much needed work and very valuable; helps keep the Linux ecosystem safe and secure. Great that the user is getting properly vetted apps, and if they need the latest, untested version, they’re automatically notified so they can look for that newest version outside the repository. Gives info and choice to the user…

Well, that is of the disadvantages. APT will provide you with the latest version that the package maintainer has test, but it might not be the latest version from the developer. For most distro’s the two versions are very close. But, some distro’s have been known to lag behind a bit.

Security patches are prioritized and come through first.

The disadvantage being that you are not notified of the latest version, only the versions within the repo’s you have configured. Also, keep in mind that the repo’s are not limited to just the distro. You can install 3rd party repo’s. This comes with a caveat, though. I would advise that you limit the repo’s you configure to just those that you trust. This can be a treat vector for malicious code. Be careful.

With all that being said, I’m not an Ubuntu user, but I would imagine that as large and organized as they are, that they stop on top of this and that you will find most everything is up to date.

2 Likes

Thanks everyone for all the details. It all helped me understand app updating and helped me create a cheat sheet of the various classes of apps and how they get updated. I’ve got a few more detailed questions I’ll put in other posts. Thanks!

Could someone mark this as Resolved? Thanks.

1 Like