2

I need to rollback some packages. I have a list of all the packages I need to rollback and the versions I need. All the versions I need are sitting in /var/cache/apt/archives yet apt ignored them telling me that it couldn't find the version I asked for. How can I get apt to see the older versions? I did try using dpkg-scanpackages but it seems to ignore the older ones favoring the newer ones. The command I used is apt-get -s install $(cat rollback.txt | tr '\n' ' '). rollback.txt contains all of the packages I wish to downgrade in the correct apt format. rollback.txt. The errors are linked here: errors.log. I'm basically looking to downgrade of everything from today. I'll then go through and do an upgrade that won't brick my system.

  • Tell us what commands you used, along with the results, including error messages. And it's downgrade, not rollback. – Faheem Mitha Dec 22 '16 at 9:40
  • @FaheemMitha alright I updated the post – Scoopta Dec 22 '16 at 9:50
  • You'll have to force downgrades. Apt isn't going to downgrade otherwise. And note that Debian doesn't officially support downgrades, though it's possible to downgrade if you are careful and know what you are doing. I once walked a guy through a mass downgrade over Unix SE chat. What packages are you trying to downgrade? If it's a long list, what's the number of packages? Also, why are you trying to downgrade these packages? Some context might be helpful. – Faheem Mitha Dec 22 '16 at 15:22
  • @FaheemMitha I'm running the AMDGPU-PRO drivers under debian sid and the latest upgrade completely bricked my drivers. The drivers are only supported on Ubuntu, SLES, RHEL, and CentOS but it's important that I use them and not Mesa because I'm one of the few people who game on Linux and Mesa performance is terrible. Also my original post has a list of the packages I'm trying to downgrade. I don't need to downgrade all of them but I figured it'd be less of a headache to do that and then upgrade carefully from there. – Scoopta Dec 22 '16 at 19:25
  • More context. What was this upgrade? Are you running testing/unstable, or something else? Also, do you have any idea what caused the breakages? Packages related to the kernel and/or X would be my first guesses. That's a long list of packages. Maybe start with downgrading a single package to make sure it works. Run apt-cache policy pkgname to see the available versions. – Faheem Mitha Dec 22 '16 at 20:09
0

I must correct me. In /var/cache/apt/archives

dpkg-scanpackages -m ./ /dev/null | gzip > Packages.gz

The parameter -m means -m, --multiversion Include all found packages in the output.

0

I'm not sure if it also works for you this way. cat /path/to/rollback.txt | xargs apt-get install --reinstall on a System with full root-acount.

With sudo cat /path/to/rollback.txt | xargs sudo apt-get install

Maybe you need the option -y for apt, I can not remember. But with the option -y apt-get will install a once without any questioning.

This answer can here not work.

I would do it with aptoncd. With that Programm you can create an iso which can be use with apt-cdrom so you can use it as sources.

create temporaly an entry in /etc/fstab /dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0 and mkdir /media/cdrom

Create an iso. udisksctl loop-setup -f /path/to/aptoncd-iso as user, be attentive to what loop-device the iso ist mapped. As root or with sudo mount /dev/loop? /media/cdrom Then apt-cdrom -m add and apt update and then try again cat /path/to/rollback.txt | xargs apt-get install --reinstall I know it is a long way. Then you achive your goal, then comment the enty in /etc/fstab out. This is important and the new Entry in sources.list too

  • Yeah the problem isn't that it won't install them, it's that it says it can't find the versions I specified but all of the versions it says it can't find are sitting in the apt cache. I just can't figure out why it's ignoring them. – Scoopta Dec 22 '16 at 10:37
  • Hm, can you show apt-cache policy base-files ? Maybe your Versions are not longer availible in the package sources . – user192526 Dec 22 '16 at 10:51
  • the only version listed is 9.7 which is the one currently installed however if I go to /var/cache/apt/archives and do ls -l | grep base-files it shows two different .deb files. One is 9.7 the other is 9.6 yet it tells me it can't find version 9.6 and that's the mystery I'm trying to solve. I have all the older packages but apt can't find them. – Scoopta Dec 22 '16 at 10:54
  • It doesn't matter for apt what it is in his cache. it draws it's Informations what is availible from your sources and store it under /var/lib/apt/lists/* – user192526 Dec 22 '16 at 11:46
  • interesting. What can I do then? Is there a way to have dpkg-scanpackages scan all versions not just the latest or? – Scoopta Dec 22 '16 at 19:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.