How To Install towncrier on Ubuntu 22.04

In this tutorial we learn how to install towncrier on Ubuntu 22.04. towncrier is compiler for project news file

Introduction

In this tutorial we learn how to install towncrier on Ubuntu 22.04.

What is towncrier

towncrier is:

Towncrier is a utility to produce useful, summarised news files for your project. Rather than reading the VCS history as some newer tools do, or having one single file which developers all write to, towncrier reads “news fragments” which contain information useful to end users.

towncrier delivers the news which is convenient to those that hear it, not those that write it.

That is, a “news fragment” (a small file containing just enough information to be useful to end users) can be written that summarises what has changed from the “developer log” (which may contain complex information about the original issue, how it was fixed, who authored the fix, and who reviewed the fix). By compiling a collection of these fragments, towncrier can produce a digest of the changes which is valuable to those who may wish to use the software.

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

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

sudo apt-get update

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

sudo apt-get -y install towncrier

Install towncrier Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install towncrier

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

sudo aptitude -y install towncrier

How To Uninstall towncrier on Ubuntu 22.04

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

sudo apt-get remove towncrier

Uninstall towncrier And Its Dependencies

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

sudo apt-get -y autoremove towncrier

Remove towncrier Configurations and Data

To remove towncrier configuration and data from Ubuntu 22.04 we can use the following command:

sudo apt-get -y purge towncrier

Remove towncrier configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge towncrier

References

Summary

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