Apt list --upgradable returns nothing

I’ve a problem with deb packages upgradable, with debian 12.

I’ve registered the debian client with subscription-manager, the rhsm.source file has been created and apt update works fine. But when I’m trying to list the upgradable pkgs, it returns empty. From the web UI it says that there are 16 pkgs available to upgrade for this client.
I’ve tried to change the source.list pointing to foreman but nothing changed

I’m using foreman 4.15 and katello 3.13

I’ve got this plugins enabled: Openscap, Pulpcore, Puppet CA, Puppet e Logs

Foreman is installed on Rocky Linux 9

root@debian12:~# apt update
Ign:1 katello://foreman.example.com/pulp/content/US11/Debian/Debian_12/custom/Debian_12/Debian_12_main bookworm InRelease
Ign:2 katello://foreman.example.com/pulp/content/US11/Debian/Debian_12/custom/Debian_12/Debian_12_updates bookworm-updates InRelease
Ign:3 katello://foreman.example.com/pulp/content/US11/Debian/Debian_12/custom/Debian_12/Debian_12_security bookworm-security InRelease
Get:4 katello://foreman.example.com/pulp/content/US11/Debian/Debian_12/custom/Debian_12/Debian_12_main bookworm Release [4,886 B]
Get:5 katello://foreman.example.com/pulp/content/US11/Debian/Debian_12/custom/Debian_12/Debian_12_updates bookworm-updates Release [4,891 B]
Get:6 katello://foreman.example.com/pulp/content/US11/Debian/Debian_12/custom/Debian_12/Debian_12_security bookworm-security Release [4,919 B]
Ign:7 katello://foreman.example.com/pulp/content/US11/Debian/Debian_12/custom/Debian_12/Debian_12_main bookworm Release.gpg
Ign:8 katello://foreman.example.com/pulp/content/US11/Debian/Debian_12/custom/Debian_12/Debian_12_updates bookworm-updates Release.gpg
Hit:9 http://apt.puppet.com bookworm InRelease
Ign:10 katello://foreman.example.com/pulp/content/US11/Debian/Debian_12/custom/Debian_12/Debian_12_security bookworm-security Release.gpg
Hit:11 https://repo.zabbix.com/zabbix/6.0/debian bookworm InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
root@debian12:~# apt list --upgradable
Listing... Done
zabbix-agent/zabbix 1:6.0.39-1+debian12 amd64 [upgradable from: 1:6.0.37-1+debian12]
N: There are 22 additional versions. Please use the '-a' switch to see them.
root@debian12:~#

root@debian12:~# subscription-manager repos --list
+----------------------------------------------------------+
    Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID:   US11_Debian_12_Debian_12_updates
Repo Name: Debian 12 updates
Repo URL:  https://foreman.example.com/pulp/content/US11/Debian/Debian_12/custom/Debian_12/Debian_12_updates/%3Fcomp%3Dnon-free-firmware%2Cmain%26rel%3Dbookworm-updates
Enabled:   1

Repo ID:   US11_Debian_12_Debian_12_security
Repo Name: Debian 12 security
Repo URL:  https://foreman.example.com/pulp/content/US11/Debian/Debian_12/custom/Debian_12/Debian_12_security/%3Fcomp%3Dupdates/non-free-firmware%2Cupdates/main%26rel%3Dbookworm-security
Enabled:   1

Repo ID:   US11_Debian_12_client_Debian_12_client
Repo Name: Debian 12 client
Repo URL:  https://foreman.example.com/pulp/content/US11/Debian/Debian_12/custom/Debian_12_client/Debian_12_client/%3Fcomp%3Dmain%26rel%3Dstable
Enabled:   1

Repo ID:   US11_Debian_12_Debian_12_main
Repo Name: Debian 12 main
Repo URL:  https://foreman.example.com/pulp/content/US11/Debian/Debian_12/custom/Debian_12/Debian_12_main/%3Fcomp%3Dnon-free-firmware%2Cmain%26rel%3Dbookworm
Enabled:   1

root@debian12:~#

@atix any suggestions here?

The packages that the UI displays as upgradable: what real version have the packages installed on the client-host? Are they already up-to-date or do they not “see” the upgrades?

In the first case, it might be that the InstalledPackage list has not been updated. You can try to do this by running package-profile-upload on the client-host.

Can you install new packages from the repositories?

The command package-profile-upload returns nothing. On the client host the pkgs are not updated:

root@debian12:~# dpkg -l |grep openssh
ii  openssh-client                             1:9.2p1-2+deb12u4                   amd64        secure shell (SSH) client, for secure access to remote machines
ii  openssh-server                             1:9.2p1-2+deb12u4                   amd64        secure shell (SSH) server, for secure access from remote machines
ii  openssh-sftp-server                        1:9.2p1-2+deb12u4                   amd64        secure shell (SSH) sftp server module, for SFTP access from remote machines

This is what i see from web UI regarding the same client content host

I’ve tried to install a pkg that is available from foreman and it has been installed correctly:

root@debian12:~# dpkg -l|grep 7zip
root@debian12:~#
root@debian12:~# apt search 7zip
Sorting... Done
Full Text Search... Done
7zip/stable 22.01+dfsg-8+deb12u1 amd64
  7-Zip file archiver with a high compression ratio

p7zip/stable 16.02+dfsg-8 amd64
  7zr file archiver with high compression ratio

p7zip-full/stable 16.02+dfsg-8 amd64
  7z and 7za file archivers with high compression ratio

root@debian12:~# apt install 7zip
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  7zip
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 977 kB of archives.
After this operation, 2,663 kB of additional disk space will be used.
Get:1 katello://foreman.example.com/pulp/content/US11/Debian/Debian_12/custom/Debian_12/Debian_12_main bookworm/main amd64 7zip amd64 22.01+dfsg-8+deb12u1 [977 kB]
Selecting previously unselected package 7zip.
(Reading database ... 61644 files and directories currently installed.)
Preparing to unpack .../7zip_22.01+dfsg-8+deb12u1_amd64.deb ...
Unpacking 7zip (22.01+dfsg-8+deb12u1) ...
Setting up 7zip (22.01+dfsg-8+deb12u1) ...
root@debian12:~#

After I’ve installed 7zip, I’ve relaunched package-profile-upload and now it returns with

Package profile updates
        status: 1
        updates: []
        exceptions:
1 Like

Any suggestions?
7zip results installed but all the other packages remains “orphaned”. From the Foreman UI, I continue to see the 16 upgradable packages, but from the VM, no.

It might not have to do with this, but the apt update output suggests that you do not have signed repository-metadata. Did you create and configure a deb-signing key?

The Release files seem to be read OK, though.

It puzzles me that new packages can be installed, but the updates are not visible :thinking:
Have you tried doing the following:

apt clean
apt update
apt dist-upgrade

This should enforce that the repository metadata is up-to-date and not cached as well as trying to install any upgrade.

1 Like

Nothing changed:

root@debian12:~# apt clean
root@debian12:~#
root@debian12:~#
root@debian12:~# ll /var/cache/apt/
total 12
drwxr-xr-x 3 root root 8192 Mar 18 15:53 archives
root@debian12:~#
root@debian12:~#
root@debian12:~# apt update
Ign:1 katello://foreman.example.com/pulp/content/US11/Debian/Debian_12/custom/Debian_12/Debian_12_security bookworm-security InRelease
Ign:2 katello://foreman.example.com/pulp/content/US11/Debian/Debian_12/custom/Debian_12_client/Debian_12_client stable InRelease
Ign:3 katello://foreman.example.com/pulp/content/US11/Debian/Debian_12/custom/Debian_12/Debian_12_main bookworm InRelease
Ign:4 katello://foreman.example.com/pulp/content/US11/Debian/Debian_12/custom/Debian_12/Debian_12_updates bookworm-updates InRelease
Get:5 katello://foreman.example.com/pulp/content/US11/Debian/Debian_12/custom/Debian_12/Debian_12_security bookworm-security Release [4,919 B]
Get:6 katello://foreman.example.com/pulp/content/US11/Debian/Debian_12/custom/Debian_12_client/Debian_12_client stable Release [2,360 B]
Hit:7 http://apt.puppet.com bookworm InRelease
Get:8 katello://foreman.example.com/pulp/content/US11/Debian/Debian_12/custom/Debian_12/Debian_12_main bookworm Release [4,886 B]
Get:9 katello://foreman.example.com/pulp/content/US11/Debian/Debian_12/custom/Debian_12/Debian_12_updates bookworm-updates Release [4,891 B]
Ign:10 katello://foreman.example.com/pulp/content/US11/Debian/Debian_12/custom/Debian_12/Debian_12_security bookworm-security Release.gpg
Ign:11 katello://foreman.example.com/pulp/content/US11/Debian/Debian_12/custom/Debian_12_client/Debian_12_client stable Release.gpg
Ign:12 katello://foreman.example.com/pulp/content/US11/Debian/Debian_12/custom/Debian_12/Debian_12_main bookworm Release.gpg
Ign:13 katello://foreman.example.com/pulp/content/US11/Debian/Debian_12/custom/Debian_12/Debian_12_updates bookworm-updates Release.gpg
Hit:14 https://repo.zabbix.com/zabbix/6.0/debian bookworm InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
root@debian12:~#
root@debian12:~#
root@debian12:~#
root@debian12:~# apt dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  zabbix-agent
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 655 kB of archives.
After this operation, 2,048 B of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.

I’ve unregistered the VMs and re-registered and everything works fine. Now I see the complete list of upgradable packages