How To Install rpmlint on Ubuntu 18.04

In this tutorial we learn how to install rpmlint on Ubuntu 18.04. rpmlint is RPM package checker

Introduction

In this tutorial we learn how to install rpmlint on Ubuntu 18.04.

What is rpmlint

rpmlint is:

rpmlint is a tool for checking common errors in rpm packages. rpmlint can be used to test individual packages before uploading or to check an entire distribution. By default all applicable checks are performed but specific checks can be performed by using command line parameters.

rpmlint can check binary rpms (files and installed ones), source rpms, and plain specfiles, but all checks do not apply to all argument types. For best check coverage, run rpmlint on source rpms instead of plain specfiles, and installed binary rpms instead of uninstalled binary rpm files.

The idea for rpmlint is from the lintian tool of the Debian project.

There are three methods to install rpmlint 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 rpmlint Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install rpmlint

Install rpmlint Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install rpmlint

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

sudo aptitude -y install rpmlint

How To Uninstall rpmlint on Ubuntu 18.04

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

sudo apt-get remove rpmlint

Uninstall rpmlint And Its Dependencies

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

sudo apt-get -y autoremove rpmlint

Remove rpmlint Configurations and Data

To remove rpmlint configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge rpmlint

Remove rpmlint configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge rpmlint

References

Summary

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