Score:3

Where can I see how a program was installed?

cn flag

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
vanadium avatar
cn flag
Does this answer your question? [How do I find out which repository a package comes from?](https://askubuntu.com/questions/8560/how-do-i-find-out-which-repository-a-package-comes-from)
user535733 avatar
cn flag
Start with `which` and `whereis`. Where is your Zoom executable located in your filesystem? Consider deleting your example, which confused me into thinking you were asking how to identify a Snap vs. deb. Your Zoom seems to be neither.
Amanda avatar
cn flag
@user535733 I edited to clarify my question, which is broader than just "how is Zoom installed." It's definitely "how do I go about figuring out how any one thing was installed"
Score:2
cn flag
raj

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).

Amanda avatar
cn flag
Hmm. So anything in "Installed (local or obsolete)" will be something I installed from a local file, rather than from a repository?
raj avatar
cn flag
raj
@Amanda As I wrote, some default system libraries are included in that category too. But otherwise yes. It may be also something you installed from a repository, but it's not available in repository anymore (that means "obsolete" in this context).
Score:2
zw flag

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 avatar
cn flag
This is very helpful. `which` hadn't occurred to me as a way to differentiate Snaps from things installed with `apt` / Synaptic. But `dpkg` doesn't show me whether I installed from a local file or a repository. I *think* `apt-cache policy` is telling me there's no repo associated with Zoom, so I can assume that was installed from a local package.
de flag
I couldn't believe I just *downloaded* zoom as a .deb file. I cancelled installation on reading this post and then it wouldn't *let* me install after that. All the while my version in the command line told me I hadn't updated: `ii zoom 5.10.4.2845`. **Ubuntu Software** was saying I had 5.11. I had to uninstall before I could install to make it right. `dpkg -l`, and these heuristics, are a good answer. I like the question more as I didn't know about `apt policy` before.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.