3

I want to uninstall RabbitMQ on Ubuntu 10.04, and issued the following command:

sudo apt-get --purge autoremove rabbitmq-server

which uninstalls all its dependencies such erlang libraries, but failed to remove rabbitmq-server itself.

When I repeat the command above, I get:

(Reading database ... 26297 files and directories currently installed.)
Removing rabbitmq-server ...
 * Stopping message broker rabbitmq-server                                              
 * message broker already stopped
                                                                                [ OK ]
invoke-rc.d: initscript rabbitmq-server, action "stop" failed.
dpkg: error processing rabbitmq-server (--purge):
 subprocess installed pre-removal script returned error exit status 3
 * Starting message broker rabbitmq-server                                              
 * FAILED - check /var/log/rabbitmq/startup_\{log, _err\}
                                                                                [fail]
invoke-rc.d: initscript rabbitmq-server, action "start" failed.
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 rabbitmq-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

What can I do next to remove the package completely? Thanks!

2

1 Answer 1

6

I'd go this way:

Try removing it without further options: sudo apt-get remove rabbitmq-server

See if that works, if not, probably a new error message arises.

If the deinstallation script expects the server to be running, it might help to start it before running the command. If it can't be started any more, I'd try to hack the script to return an exit code of 0 to trick the script.

After something worked, I'd do the --purge option and then autoremove.

4
  • running sudo apt-get remove rabbitmq-server gives the exactly same error message. I agree that uninstallation script probably expects the server to be running, but the problem is that all its dependencies have been removed, which is exactly why it cannot be started.
    – MLister
    Sep 20, 2012 at 17:12
  • So what does editing /etc/init.d/rabbitmq-server and adding exit 0 after the first line do? Does it still complain?
    – exic
    Sep 21, 2012 at 9:20
  • probably should try that first, but I just force deleted the package, and manually cleared up any rabbit-mq related files.
    – MLister
    Sep 21, 2012 at 17:07
  • I guess that's valid too :-) Doesn't purge work after force deleting it?
    – exic
    Sep 21, 2012 at 20:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .