How to remove or reinstall or upgrade the asterisk

Asterisk - Remove - Uninstall - upgrade - Reinstall

Topic: How to remove or reinstall or upgrade the asterisk

asterisk remove uninstall upgrade


    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.

  Issue: Remove or uninstall 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.  

  Steps : Asterisk uninstall/Remove

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

    Confrim 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
Latest Asterisk Download link
Asterisk Download Repository for older versions
Common steps used to install asterisk it might differ according to your requirement
make install
make samples


    Hope the article is useful, for professional support reach me on skype:striker24x7
check out my youtube channel

Next Post Previous Post
  • gopi baskar
    gopi baskar April 4, 2022 at 11:16 AM

    How to remove or uninstall asterisk in vicidial

Add Comment
comment url