Downgrade packages from CLI?

Asked by Sergey "Shnatsel" Davidoff on 2011-12-14

I'm trying to downgrade some packages from a BASH script (I'm rewriting lp:ppa-purge using aptdaemon).
Aptdcon doesn't support downgrading, so I tried using dbus-send, but I can't figure out how to format the request. I've tried doing some basic calls like updating cache, but every combination I tried returned an error. I've tried running update-manager and capturing the message with dbus-monitor, but I haven't captured any any UpdateCache calls in neither session nor system bus. An example command that downgrades several packages would be ideal, but how do I make at least basic calls with dbus-send?

Question information

Language:
English Edit question
Status:
Solved
For:
Aptdaemon Edit question
Assignee:
No assignee Edit question
Solved by:
Sebastian Heinlein
Solved:
2011-12-15
Last query:
2011-12-15
Last reply:
2011-12-15

This question was reopened

Sebastian Heinlein (glatzor) said : #1

For reference: http://packages.python.org/aptdaemon/dbus.html#org-debian-apt-the-aptdaemon-interface

You can use the CommitPackages method to downgrade packages. Please consider that downgrades are not supported by Debian or Ubuntu. The install scripts only can convert to a later version.

aptdcon has got an option --downgrade that allows you to downgrade the system. There isn't any need to use dbus-send (which would not work very well at all)

aptdcon --downgrade="xterm=246-1 abook=34-1"

Thanks Sebastian Heinlein, that solved my question.

I must have seen an outdated version of aptdcon manpage then. Thanks a lot!

For some totally mysterious reason aptdcon just prints usage when I run this:
$ aptdcon --downgrade="unity=4.22.0-0ubuntu3"
I've tried any combination I cound invent, escape everything that's escapable, and it still prints usage. Any ideas?

Best Sebastian Heinlein (glatzor) said : #5

This was a bug. I just fixed it. It will be uploaded to precise soon.

Sebastian Heinlein (glatzor) said : #6

You can just use apt-get install xterm=246 to downgrade packages in oneiric

Thanks Sebastian Heinlein, that solved my question.