Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|improve this question
    
serverfault.com/questions/225795/… –  quanta Sep 20 '12 at 16:38
    
@quanta, that question is about errors during installation, not errors when uninstalling RabbitMQ. –  MLister Sep 20 '12 at 17:09

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
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 '12 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 '12 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 '12 at 17:07
    
I guess that's valid too :-) Doesn't purge work after force deleting it? –  exic Sep 21 '12 at 20:10
    
yes it does. thanks for the pointers anyway –  MLister Sep 21 '12 at 20:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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