How To Install php-net-nntp on Ubuntu 18.04

In this tutorial we learn how to install php-net-nntp on Ubuntu 18.04. php-net-nntp is NNTP implementation

Introduction

In this tutorial we learn how to install php-net-nntp on Ubuntu 18.04.

What is php-net-nntp

php-net-nntp is:

PEAR’s package for communication with NNTP/Usenet servers. Net_NNTP handles the connection and protocol level commands (RFC977), including many commonly implemented non-standard commands (RFC2980). Net_NNTP includes an unserfriendly API for intermediate user, who don’t want to work directly at the command level. However, Net_NNTP does require some knowlege about the NNTP protocol (RFC 977), and general knowledge about email (RFC(2)822) and MIME (2045-2048), since any handling of both content and headers is left up to the user! The protocol implementation does not parse the actual article data, but at the command level it splits returned data at protocol specified boundaries where appropriate.

There are three methods to install php-net-nntp on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install php-net-nntp Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install php-net-nntp

Install php-net-nntp Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install php-net-nntp using apt by running the following command:

sudo apt -y install php-net-nntp

Install php-net-nntp 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 Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install php-net-nntp using aptitude by running the following command:

sudo aptitude -y install php-net-nntp

How To Uninstall php-net-nntp on Ubuntu 18.04

To uninstall only the php-net-nntp package we can use the following command:

sudo apt-get remove php-net-nntp

Uninstall php-net-nntp And Its Dependencies

To uninstall php-net-nntp and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove php-net-nntp

Remove php-net-nntp Configurations and Data

To remove php-net-nntp configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge php-net-nntp

Remove php-net-nntp configuration, data, and all of its dependencies

We can use the following command to remove php-net-nntp configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge php-net-nntp

References

Summary

In this tutorial we learn how to install php-net-nntp package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.