[ZBX-19947] Unable to downgrade packages with apt on Debian-based systems Created: 2021 Sep 10  Updated: 2024 May 02  Resolved: 2024 Apr 05

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Packages (C)
Affects Version/s: 5.4.4, 6.0.21, 6.4.6
Fix Version/s: 6.0.29rc1, 6.4.14rc1, 7.0.0beta3, 7.0 (plan)

Type: Problem report Priority: Major
Reporter: Khatsayuk Alexander Assignee: Jurijs Klopovskis
Resolution: Fixed Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by ZBX-19988 official repo does not provide meta i... Closed
Sub-task
part of ZBXNEXT-8119 Integration with RedHat Ansible Closed
Team: Team B
Sprint: Sprint 80 (Sep 2021), Sprint 104 (Sep 2023), Sprint 105 (Oct 2023), Sprint 106 (Nov 2023), Sprint 107 (Dec 2023), S2401, S24-W14/15
Story Points: 1

 Description   

Hello!

Now we have no ability to downgrade Zabbix packages on Debian-based systems because of repository Package file contains information about latest version only, e.g.:

apt-cache policy zabbix-agent2 
zabbix-agent2:
 Installed: 1:5.4.4-1+ubuntu20.04
 Candidate: 1:5.4.4-1+ubuntu20.04
 Version table:
 *** 1:5.4.4-1+ubuntu20.04 500
 500 http://repo.zabbix.com/zabbix/5.4/ubuntu focal/main amd64 Packages
 100 /var/lib/dpkg/status

So, we cannot do something like this to downgrade to 5.4.3:

apt install zabbix-agent2=5.4.3
Reading package lists... Done
Building dependency tree 
Reading state information... Done
E: Version '5.4.3' for 'zabbix-agent2' was not found


 Comments   
Comment by Jurijs Klopovskis [ 2021 Sep 13 ]

This is a known issue and needs to be addressed. CONFIRMED

Comment by Jurijs Klopovskis [ 2021 Sep 20 ]

After some investigating I've concluded that it's not feasible with our current setup.

We use reprepro to manage deb package repos. Unfortunately it can only store a single version of each package per distribution in its database. Some attempts to fix that were made, but to no avail. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=570623

Another solution would be to move away from reprepro to dak or mini-dak, but that's too big of an effort at this time.

The only workaround that I can think of is to manually download a specific package version and install it directly with dpkg. Possible pin the package version to prevent updates, if that's what you need.

Comment by dimir [ 2021 Sep 21 ]

Congirming as duplicate (ZBX-19988) was confirmed.

Comment by dimir [ 2023 Nov 06 ]

Adding index of previous versions didn't appear to be a trivial task with current packaging that we have. Looks like reprepro, that we rely on does not have that option. We'll investigate on the possibilities to implement it but it will take some time. We are open for suggestions if anyone has them.

Comment by Jurijs Klopovskis [ 2024 Feb 01 ]

Regenerated metadata for all deb-based pre-7.0 repos, to include all version in Packages file.

  • debian
  • debian-arm64
  • ubuntu
  • ubuntu-arm64
  • raspbian

If all goes well, will update 6.4 and later 6.0 repos as well. But first let's test it some, using unstable packages.

Report any problems you find.

Comment by Mickael Martin [ 2024 Mar 05 ]

Thank you!

Comment by Jurijs Klopovskis [ 2024 Mar 19 ]

Done in 6.4
Give it a spin.

Comment by Jurijs Klopovskis [ 2024 May 02 ]

Done for 6.0

Generated at Thu May 08 08:40:59 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.