1.Run the rpm -qa|grep rabbitmq command to check whether RabbitMQ exists on this server.

[root@localhost ~]# rpm -qa|grep rabbitmq
rabbitmq-server-3.7.7-1.el7.noarch

2.If it exists, complete the following steps to uninstall it:

1)Run the cd /usr/lib/netbrain/installer/rabbitmq command to navigate to the rabbitmq directory.

2)Run the ./uninstall.sh command under the rabbitmq directory.

3)Specify whether to remove all RabbitMQ data. To remove data, type y or yes., otherwise, type n or no.

[root@localhost ~]# cd /usr/lib/netbrain/installer/rabbitmq
root@localhost rabbitmq]# ./uninstall.sh
INFO: Starting uninstall RabbitMQ ...
WARNING: Do you want to remove the data/log/config after uninstalling the RabbitMQ component?
Input [ yes | y ] if you want to remove all installation data (if your input is not 'yes' or 'y', it 
will set to default value : no) :y
WARNING: Do you want to remove the data/log/config after uninstalling the RabbitMQ component?
Input [ yes | y ] if you want to remove all installation data (if your input is not 'yes' or 'y', it will set to default value : no) :y
rabbitmq-server-3.7.7-1.el7.noarch
Loaded plugins: fastestmirror
Resolving Dependencies
--> Running transaction check
---> Package rabbitmq-server.noarch 0:3.7.7-1.el7 will be erased
--> Finished Dependency Resolution
 
Dependencies Resolved
==============================================================================================================================================================================================================================================================================
 Package                                                      Arch                                                         Version                                                                      Repository                                                       Size
==============================================================================================================================================================================================================================================================================
Removing:
 erlang                                                       x86_64                                                       21.2.4-1.el7.centos                                                          installed                                                        31 M
Transaction Summary
==============================================================================================================================================================================================================================================================================
Remove  1 Package
 
Installed size: 31 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Erasing    : erlang-21.2.4-1.el7.centos.x86_64                                                                                                                                                                                                                          1/1 
  Verifying  : erlang-21.2.4-1.el7.centos.x86_64
                                                                                                                                                                                                                          1/1 
Removed:
  erlang.x86_64 0:21.2.4-1.el7.centos  
 
Complete!