Score:3

Which respository does xvnc4viewer belong to?

in flag

I am using Ubuntu 20.04 and have a list of package names of which I want to check whether it is part of the default Ubuntu repository.

So far I am iterating over the list an check with the following script:

#!/bin/bash

input="modified_list.txt"

RED='\033[0;31m'
NC='\033[0m'

if [ ! -f $input ];
then
    echo -e "file does not exist: $input"
    exit 1
fi

while read -r line
do
    if [[ $(apt policy $line  2> /dev/null | grep 'focal' | wc -l) -gt 0 ]];
    then
        # print package name normal if part of ubuntu default repo
        echo -e "$line\t"
    else
        # print package name red if not in default repo
        echo -e "${RED}${line}${NC}" 
    fi

done < $input

Here I noticed the package xvnc4viewer is (according to the script) not part of the repository. When executing apt policy xvnc4viewer the terminal outputs:

xvnc4viewer:
  Installed: 4.1.1+xorg4.3.0-37.3ubuntu2
  Candidate: 4.1.1+xorg4.3.0-37.3ubuntu2
  Version table:
 *** 4.1.1+xorg4.3.0-37.3ubuntu2 100
        100 /var/lib/dpkg/status

When using the command on other packages, I found an URL or something that helped me to figure out where the package comes from, but in this case I couldn't figure it out. Using apt-cache search xvnc4viewer the package is found but commands like apt-cache showpkg did not help me either. So, how do I figure out where the package is coming from?

Score:6
cn flag

The xvnc4viewer package was removed from the Ubuntu repositories after Ubuntu 18.04.

$ rmadison xvnc4viewer
 xvnc4viewer | 4.1.1+xorg4.3.0-37ubuntu5     | trusty/universe          | amd64, armhf, i386, powerpc
 xvnc4viewer | 4.1.1+xorg4.3.0-37ubuntu5.0.2 | trusty-security/universe | amd64, arm64, armhf, i386, powerpc
 xvnc4viewer | 4.1.1+xorg4.3.0-37ubuntu5.0.2 | trusty-updates/universe  | amd64, arm64, armhf, i386, powerpc
 xvnc4viewer | 4.1.1+xorg4.3.0-37.3ubuntu2   | xenial/universe          | amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
 xvnc4viewer | 4.1.1+xorg4.3.0-37.3ubuntu2   | bionic/universe          | amd64, arm64, armhf, i386, ppc64el, s390x
  • The rmadison command is included with the devscripts package.
  • You can get the same information in a different format by browsing http://packages.ubuntu.com

Note that the package is in the -universe pocket, and is still available for Ubuntu 18.04 (but not for newer releases). Universe packages are not part of a stock install of Ubuntu. They are still Ubuntu packages, and we still support them. They're just not included with the Ubuntu installer.

Also, keep in mind that doing a release-upgrade (from, say, 18.04 to 20.04) does NOT necessarily remove the older software. If a 20.04 package exists, it replaces the 18.04 package. If a 20.04 package does not exist, then then 18.04 package remains installed on the 20.04 system as long as it is compatible.

Score:5
cn flag

xvnc4viewer isn't part of the default repositories for Ubuntu 20.04 (Focal Fossa), but it is part of the default repositories for Ubuntu 18.04 (Bionic Beaver). The exact version of the package, 4.1.1+xorg4.3.0-37.3ubuntu2, also matches that. So I'd assume that the system in question has previously been running 18.04 and has been upgraded since.

apt policy only mentions repositories that currently are in the system's source list. So the system might previously have the repositories for Bionic set up, xvnc4viewer was installed from there, and later the Bionic repos were replaced with the Focal ones during an upgrade. In this case, the repository the package originally came from isn't in the source list any more, and apt policy can't list it.

The other possibility, as Artur Meinild already mentioned, is that the package was installed manually with dpkg, with apt never coming into play for this package.

Andi avatar
in flag
Thanks! I am not very familiar with how exactly the Ubuntu packet-management works. But if it was installed manually or on previous ubuntu version, why can I then find it with ```apt-cache search```?
cn flag
@Andi `apt-cache` is used to query, manipulate etc. an internal cache that `apt` is keeping. This cache gets updated when you run `apt update`. I'm not sure whether during those updates outdated information (from repositories that have been removed) is purged by default. But I would assume that `xvnc4viewer` has previously been added to `apt`'s cache and stayed there, even after the repository in question had been removed / updated.
user535733 avatar
cn flag
The internal database (cache) tracks installed packages AND packages in the local archive dir AND packages available online. The package in question is installed, so it shows up. That it's no longer available online is why the entry looks unusual to the OP.
Score:3
vn flag

Most likely, this package was downloaded and then installed manually with sudo apt install <package name>.

Searching the web for the package name, you can see that this version of the package was only available in the Bionic Universe repo.

You can't always see the origin of a manually downloaded package, so you have to resolve to other means than the apt utility.

Score:2
my flag

As said by Artur Meinild, this package is only available for Ubuntu 18.04 bionic.

There can be two reasons for it to be in your system.

  1. You installed the software after adding a PPA and changing its release name to focal.
    This means that you installed this package using a custom PPA or that you built it from the source using any third-party dependencies or modified source code. After installing the software, you've removed the source/PPA for the package.

  2. You marked this package as manually installed. This means you were running Ubuntu 18.04 before upgrading to Ubuntu 20.04 with do-release-upgrade. This package was supposed to be removed because it wasn't available for focal. However, it's possible that it was marked as a dependency or manually installed package. Dependencies and manually installed packages are not removed during this process. It's also possible that this was previously installed as a dependency for any custom package installed through a PPA or source repository (the PPA must be removed with the package itself and left this package as manually installed. Maybe it was marked manually installed by you? )

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.