how to remove or uninstall asterisk

How to remove or uninstall asterisk

       It is sometimes necessary to completely remove asterisk ,for reasons like installing the latest version or reinstall the same version, below blog will lead you for the same.

*******************************

Step 1: Stopping the asterisk and unload its modules

*******************************

       The first thing you have to do is to stop asterisk and unload the modules 
the following commans will terminate the asterisk and kill all the ongoing conversation

killall -9 safe_asterisk
killall -9 asterisk

*******************************

Step 2 : deleting the asterisk files

*******************************

       By running the below command , you will delte with no possible recovery ,so if any thing important like asterisk dialplans, carriers settings, recordings, take a backup

rm -rf /etc/asterisk
rm -rf /var/log/asterisk
rm -rf /var/lib/asterisk
rm -rf /var/spool/asterisk
rm -rf /usr/lib/asterisk

Now asterisk has been removed completely from your system
note: if you want to uninstall or remove the DAHDI driver then follow this LINK

*******************************
Also see:(related post)

Steps to install asterisk ,freepbx in centos ClickHere
Sangoma cards configuration in asterisk ClickHere
Custom voicemail greetings setup ClickHere