How To Install sox on Debian 9

In this tutorial we learn how to install sox on Debian 9. sox is Swiss army knife of sound processing

Introduction

In this tutorial we learn how to install sox on Debian 9.

What is sox

sox is:

SoX is a command line utility that can convert various formats of computer audio files in to other formats. It can also apply various effects to these sound files during the conversion. As an added bonus, SoX can play and record audio files on several unix-style platforms.

SoX is able to handle formats like Ogg Vorbis, MP3, WAV, AIFF, VOC, SND, AU, GSM and several more. Any format support requires at least libsox-fmt-base. Some formats have their own package e.g. mp3 read and write support is provided by libsox-fmt-mp3.

SoX supports most common sound architectures i.e. Alsa, Libao, OSS and Pulse (respectively provided by libsox-fmt-alsa, libsox-fmt-ao, libsox-fmt-oss and libsox-fmt-pulse). It also supports LADSPA plugins.

There are three methods to install sox on Debian 9. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install sox Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install sox using apt-get by running the following command:

sudo apt-get -y install sox

Install sox Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install sox using apt by running the following command:

sudo apt -y install sox

Install sox Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install sox using aptitude by running the following command:

sudo aptitude -y install sox

How To Uninstall sox on Debian 9

To uninstall only the sox package we can use the following command:

sudo apt-get remove sox

Uninstall sox And Its Dependencies

To uninstall sox and its dependencies that are no longer needed by Debian 9, we can use the command below:

sudo apt-get -y autoremove sox

Remove sox Configurations and Data

To remove sox configuration and data from Debian 9 we can use the following command:

sudo apt-get -y purge sox

Remove sox configuration, data, and all of its dependencies

We can use the following command to remove sox configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge sox

Dependencies

sox have the following dependencies:

References

Summary

In this tutorial we learn how to install sox package on Debian 9 using different package management tools: apt, apt-get and aptitude.