How to remove or reinstall or upgrade the asterisk

    In this article we are going to learn how to Remove asterisk or uninstalling asterisk and followed to that reinstall the asterisk either same version or latest versions. If you are planning to upgrade your asterisk or reinstall another version of asterisk by removing the existing asterisk completely then this article is for your.


asterisk remove uninstall upgrade
how to remove asterisk completely and reinstall

What is Asterisk?

    Asterisk is a Open source Communication software , You can use Asterisk to build communications applications, things like business phone systems (also known as IP PBXs), call distributors, VoIP gateways and conference bridges.
    In this blog article I have provided the steps to remove or uninstall asterisk completely from the linux server.

Why I need to Remove Asterisk?

    You might be in a situation where you need to remove the asterisk for reinstalling the problematic asterisk version or you are planning to upgrade the current version of asterisk to latest version or downgrade to older version of asterisk.

Here the steps to remove the asterisk and its related files completely from linux server and reinstall the asterisk.

Step 1: Killing the asterisk services
Step 2: Deleting the Asterisk Related files
Step 3: Installing the asterisk

Step 1: Killing the asterisk service - Killall

    Before uninstalling the asterisk , you need to kill the asterisk services in the linux using the command killall as show below, Make sure any background or cronjob running which will start asterisk again

killall -9 safe_asterisk
killall -9 asterisk
systemctl disable asterisk 

Step 2: Delete all Asterisk files    

    If you are planning to upgrade or do a fresh reinstall of asterisk , you need to delete old asterisk files,
its better to take a backup if you done any custom configurations, we will be using the  linux command rm to remove the asterisk Files and Folders. 
Run the below command to Delete the asterisk related files and folders

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

Step 3: Check the Asterisk as service is still running 

   Confirm asterisk has been remove and not running as a service in the linux by running the below commands
root@server:~# ps aux | grep asterisk
root     18272  0.0  0.0   4446   788 pts/0    S+   12:10   0:00 grep asterisk

Step 4: Reinstall Asterisk

    Once the Asterisk has been removed you can follow the official asterisk installation steps to either install the same version or the latest version of asterisk, the official download link of asterisk give below


Asterisk Download Repository for older versions

Common steps used to install asterisk it might differ according to your requirement
./configure
make
make install
make samples
Conclusion:
    Hope this article is helpful in removing or uninstalling your asterisk completely from your linux server also able reinstall the same. If you are planning to install vicidial check out my vicidial scratch install guide. For professional support reach me on skype or telegram id: striker24x7

1 Comments
  • Ajit Kumar
    Ajit Kumar April 4, 2022 at 11:16 AM

    How to remove or uninstall asterisk in vicidial

Add Comment
comment url