Downgrade packages from CLI?

Asked by Sergey "Shnatsel" Davidoff

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:
Last query:
Last reply:

This question was reopened

Revision history for this message
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"

Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) said :
#2

Thanks Sebastian Heinlein, that solved my question.

Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) said :
#3

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

Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) said :
#4

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?

Revision history for this message
Best Sebastian Heinlein (glatzor) said :
#5

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

Revision history for this message
Sebastian Heinlein (glatzor) said :
#6

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

Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) said :
#7

Thanks Sebastian Heinlein, that solved my question.