16

Is there a way to see whether any one application was installed via Snap, from a PPA, via downloaded deb or from a standard repository?

At the moment, I have Zoom installed on my Focal 20.04 laptop. I'm trying to figure out how I initially installed it, but I have this problem fairly often. Either it's a proprietary app (eg. Slack or Dropbox) and I want to update it, or the app is alerting me that a newer version is available (Keepass) and I want to doublecheck that I installed from a repository and can just wait for the repo to be updated.

If I had to guess, I'd say it's likely that I installed Zoom from a downloaded .deb, but I'm not sure how to check. I don't think I installed Slack from a .deb.

I tried to follow some of the suggestions at How do I find out which repository a package comes from? but the results are ambiguous. For instance there's no apt policy result for Slack:

amanda@rajje:~$ apt policy slack
slack:
  Installed: (none)
  Candidate: 1:0.15.2-9
  Version table:
     1:0.15.2-9 500
        500 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu focal/universe i386 Packages

Presumably because I installed it from Ubuntu Software, so it's a Snap: Screenshot of Slack entry

If I try apt policy for an app that I know I haven't done any monkeying with I see a list of repositories. Can I assume that this means that I did install from a repository?

amanda@rajje:~$ apt policy emacs
emacs:
  Installed: 1:26.3+1-1ubuntu2
  Candidate: 1:26.3+1-1ubuntu2
  Version table:
 *** 1:26.3+1-1ubuntu2 500
        500 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu focal/universe i386 Packages
        100 /var/lib/dpkg/status

And if no repository is shown, does that mean that I installed from a package download?

amanda@rajje:~$ apt policy zoom
zoom:
  Installed: 5.0.403652.0509
  Candidate: 5.0.403652.0509
  Version table:
 *** 5.0.403652.0509 100
        100 /var/lib/dpkg/status
Amanda
  • 9,723

3 Answers3

9

Start with which zoom or which zoom-client. That will return the file-path to the executable. (Hint: tab completion is your friend)

Anything that starts with /snap was installed by Snap (Or the Ubuntu Software Center) so you can find out more by opening the software center or running snap list | grep -i zoom to get full/correct Snap name.

If it starts with /usr/bin it was probably installed with apt or Synaptic. In that case dpkg -l | grep -i zoom or apt policy zoom* will tell you more. Look at the "Installed (Local or Obsolete)" filter in Synaptic to see whether something installed by apt was local or via a repository.

You may also want to check for:

  • Flatpak - check with flatpak list | grep -i zoom
  • Ubuntu Make - check with umake --list-installed (For example, IDEs)
Amanda
  • 9,723
N0rbert
  • 103,263
2

Install Synaptic Package Manager (you can install it from Ubuntu Software, or from command line using sudo apt install synaptic). It is a great tool to manage .deb packages. On the main screen, it shows you packages divided into groups, as you can see in the screenshot below. Look at group called "Installed (local or obsolete)" - these are packages that have been installed from manually downloaded files and not from repositories (some very essential system packages, like libc, are also included there). On my screenshot you can see zoom among those packages.

enter image description here

BTW. In your Slack example, the program is installed as snap, not a .deb package, which can be recognized by the presence of "Channel" at the beginning of the data on your screenshot. Snap packages always have a channel (usually latest/stable) while .deb packages don't. So neither apt nor Synaptic won't know anything about that package (in fact, in your example apt policy is showing you information about a non-installed slack package available to install as .deb from the repositories).

raj
  • 11,409
-1

This is way past the date that this was asked, but I quickly created a script (this morning) to search for apps in both repos and snap at the same time, and to query for an installed app with it's source.

If anyone finds it useful, here's the git repo:

https://github.com/rabinnh/uni-pkg-util/tree/main