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.

- 28,659
- 3
- 47
- 59

- 609
- 1
- 7
- 18
-
1Your question is on Windows and you have accepted answer for Ubuntu, that's a good change indeed – Mrinal Kamboj Jun 07 '21 at 02:59
4 Answers
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..)

- 1,566
- 11
- 16
-
Ahhhh, my `pstree` output on Ubuntu 16 looks so much more compact now. Not sure how it got on my machine in the first place. – Sridhar Sarnobat Dec 15 '20 at 00:17
-
1@sashaboulouds thanks, Only these two commands are required to uninstall RabbitMQ – Rik Patel Jan 16 '23 at 10:13
-
Note: The above command will remove the current user from your OS. I suggest do not run this command. – Hemant Kumar Aug 21 '23 at 10:26
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

- 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
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

- 2,212
- 1
- 12
- 26
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.

- 717
- 4
- 8
-
1
-
2Yes but, sometimes it's necessary for [compatibility reasons](https://www.rabbitmq.com/which-erlang.html) – Ozkan Dec 14 '18 at 10:29