HOW TO: Completely Remove Asterisk

This was tested against a Ubuntu 16.04 virtual machine with Asterisk 13.22.0 and all commands were run from ~

sudo service asterisk stop
sudo rm /etc/init.d/asterisk
sudo rm /etc/init.d/asterisk.org
sudo rm -rf /etc/asterisk/
sudo rm -rf /var/log/asterisk/
sudo rm -rf /var/lib/asterisk/
sudo rm -rf /var/spool/asterisk/
sudo rm -rf /usr/lib/asterisk/

All of the Asterisk program and configuration files will now be deleted and you should have seen a notice about needing to run systemctl daemon-reload because the service files have been removed (they’re the ones from /etc/init.d/).

If you then whereis asterisk you may still see some leftovers in a few other places which you can also delete. Here is where I found remaining files:

  • /usr/sbin/asterisk
  • /usr/include/asterisk/
  • /usr/include/asterisk.h
  • /usr/share/man/man8/asterisk.8

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑

%d bloggers like this: