How To Install swaks on Debian 12

Learn how to install swaks on Debian 12 with this tutorial. swaks is SMTP command-line test tool

Introduction

In this tutorial we learn how to install swaks on Debian 12.

What is swaks

swaks is:

swaks (Swiss Army Knife SMTP) is a command-line tool written in Perl for testing SMTP setups; it supports STARTTLS and SMTP AUTH (PLAIN, LOGIN, CRAM-MD5, SPA, and DIGEST-MD5). swaks allows one to stop the SMTP dialog at any stage, e.g to check RCPT TO: without actually sending a mail.

If you are spending too much time iterating “telnet foo.example 25” swaks is for you.

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

Install swaks Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install swaks

Install swaks Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install swaks

Install swaks 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 swaks using aptitude by running the following command:

sudo aptitude -y install swaks

How To Uninstall swaks on Debian 12

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

sudo apt-get remove swaks

Uninstall swaks And Its Dependencies

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

sudo apt-get -y autoremove swaks

Remove swaks Configurations and Data

To remove swaks configuration and data from Debian 12 we can use the following command:

sudo apt-get -y purge swaks

Remove swaks configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge swaks

Dependencies

swaks have the following dependencies:

References

Summary

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