8

I'm unable to remove or uninstall mosquito broker. What are the steps needed to remove MQTT mosquitto broker in Ubuntu?

Kulfy
  • 17,696
  • i installed by using terminal sudo codes from the source of internet. – Lalithaditya Naidu Gajula Nov 14 '18 at 11:34
  • 2
    sudo apt-add-repository ppa:mosquitto-dev/mosquitto-ppa sudo apt-get update sudo apt-get install mosquitto sudo apt-get install mosquitto-clients

    i installed mosquitto broker using the above codes...

    – Lalithaditya Naidu Gajula Nov 14 '18 at 11:38
  • now i want to remove the mosquitto broker from by computer.so i need commands to remove them.. – Lalithaditya Naidu Gajula Nov 14 '18 at 11:39
  • So sudo apt purge mosquitto-clients should be enough. Make sure you type the package name correctly. – DK Bose Nov 14 '18 at 11:42
  • 2
    if you install it from a Repository, you can purge it with type sudo apt-get purge --remove mosquitto* for the include mosquitto package, mosquitto-clients package also mosquitto-dev package. if you want remove that Repository with type sudo apt-add-repository --remove ppa:mosquitto-dev/mosquitto-ppa – abu-ahmed al-khatiri Nov 14 '18 at 11:43

1 Answers1

12

As Abu Ahmed Al Khatiri comment in question, is working for me so here is the commands how these needs to run.

To remove all mosquitto packages like mosquitto, mosquitto-clients and mosquitto-dev below command will be used:-

sudo apt-get purge --remove mosquitto*

After this we need to remove repository type so need to run this command too on terminal:-

sudo apt-add-repository --remove ppa:mosquitto-dev/mosquitto-ppa

This works for me perfectly. So this may help any one.