20

I was having trouble, so I went into the registry and removed the service entry for rabbitmq. Now when I try to reinstall it says it already exists but it doesn't start (since I removed it) and I can do a sc delete rabbitmq. How do I totally remove all traces of it and reinstall from scratch? I guess it exists somewhere and the registry entry is all that is gone and the install program says it us just updating it when I do the rabbitmq-service install. I tried rabbitmq-service remove but it says it doesn't exist.

Chris Patterson
  • 28,659
  • 3
  • 47
  • 59
SDanks
  • 609
  • 1
  • 7
  • 18

4 Answers4

52

I would suggest as follows:

sudo apt-get remove --auto-remove rabbitmq-server
sudo apt-get purge --auto-remove rabbitmq-server

It will uninstall rabbitmq and purge all data (users, vhost..)

sashaboulouds
  • 1,566
  • 11
  • 16
15

RabbitMQ writes the service information into HKEY_LOCAL_MACHINE\SOFTWARE\Ericsson\Erlang\ErlSrv\1.1\RabbitMQ

To remove RabbitMQ manually you have to:

  • remove the key HKEY_LOCAL_MACHINE\SOFTWARE\Ericsson\Erlang\ErlSrv\1.1\RabbitMQ
  • remove the directory C:\Users\%USERNAME%\AppData\Roaming\RabbitMQ
  • remove the installation-folder.

Next time I suggest to use the rabbitmq-service.bat command to install and remove the service.

you have to execute it as administrator

Gabriele Santomaggio
  • 21,656
  • 4
  • 52
  • 52
  • The mention of `rabbitmq-service.bat` is very helpful here!! It's not easy to find in the rabbitmq documentation how to "re-install" the windows service, which is required sometimes. ("Restart the server after [configuration] changes. Windows service users will need to re-install the service after adding or removing a configuration file." – daevski Apr 28 '20 at 13:51
1

for macOS with homebrew

brew services stop rabbitmq
brew uninstall rabbitmq

remove the directories associated with RabbitMQ ( If you have any issues with the current version of rabbitmq they persist if the following directories are not removed )

rm -r /opt/homebrew/etc/rabbitmq                
rm -r /opt/homebrew/var/lib/rabbitmq
rm -r /opt/homebrew/var/log/rabbitmq

install rabbitmq

Note: brew update is optional but doing it following the official rabbitmq docs

brew update
brew install rabbitmq
brew services start rabbitmq

if the last command throws an error try

 brew services restart rabbitmq

if the above command throws an error simply run

rabbitmq-server

Once you are able to start rabbitmq the below commands should work fine

 brew services stop rabbitmq
 brew services start rabbitmq

PS: I didn't remove Erlang in this process

Anjan Talatam
  • 2,212
  • 1
  • 12
  • 26
0

You have to uninstall the Erlang and Rabbitmq both. After you are done with the uninstall, then try to install the Rabbitmq and it will ask you to install Erlang again.

Mitra Ghorpade
  • 717
  • 4
  • 8