How To Install nginx-common on Ubuntu 20.04

In this tutorial we learn how to install nginx-common on Ubuntu 20.04. nginx-common is small, powerful, scalable web/proxy server - common files small, powerful, scalable web/proxy server - common files

Introduction

In this tutorial we learn how to install nginx-common on Ubuntu 20.04.

What is nginx-common

nginx-common is:

Nginx (“engine X”) is a high-performance web and reverse proxy server created by Igor Sysoev. It can be used both as a standalone web server and as a proxy to reduce the load on back-end HTTP or mail servers.

This package contains base configuration files used by all versions of nginx.

Package: nginx-common Architecture: all Version: 1.17.10-0ubuntu1 Multi-Arch: foreign Priority: optional Section: httpd Source: nginx Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian Nginx Maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 273 Depends: lsb-base (>= 3.0-6), debconf (>= 0.5) | debconf-2.0 Suggests: fcgiwrap, nginx-doc, ssl-cert Filename: pool/main/n/nginx/nginx-common_1.17.10-0ubuntu1_all.deb Size: 37284 MD5sum: c9db3ece41d1d503a143b8710ecc4b55 SHA1: 93ea439cdd24b312deb157bf30bd847fa3b10629 SHA256: a127d33b971a123513607f3c8e0271df52e56735d358a88825572fdca25f7ec5 Homepage: http://nginx.net Description-en: small, powerful, scalable web/proxy server - common files Nginx (“engine X”) is a high-performance web and reverse proxy server created by Igor Sysoev. It can be used both as a standalone web server and as a proxy to reduce the load on back-end HTTP or mail servers.

This package contains base configuration files used by all versions of nginx.

There are three methods to install nginx-common on Ubuntu 20.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 nginx-common Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install nginx-common

Install nginx-common Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install nginx-common

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

sudo aptitude -y install nginx-common

How To Uninstall nginx-common on Ubuntu 20.04

To uninstall only the nginx-common package we can use the following command:

sudo apt-get remove nginx-common

Uninstall nginx-common And Its Dependencies

To uninstall nginx-common and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove nginx-common

Remove nginx-common Configurations and Data

To remove nginx-common configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge nginx-common

Remove nginx-common configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge nginx-common

References

Summary

In this tutorial we learn how to install nginx-common package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.