How To Install python3-rangehttpserver on Ubuntu 22.04

In this tutorial we learn how to install python3-rangehttpserver on Ubuntu 22.04. python3-rangehttpserver is SimpleHTTPServer with support for Range requests

Introduction

In this tutorial we learn how to install python3-rangehttpserver on Ubuntu 22.04.

What is python3-rangehttpserver

python3-rangehttpserver is:

RangeHTTPServer is a Python module for running a simple HTTP server with support for range requests. It is suitable for use in local testing, not Internet scale production use.

HTTP range requests ask the server to send only a portion of an HTTP message back to a client and are useful for clients like media players that support random access, data tools that know they need only part of a large file, and download managers that let the user pause and resume the download.

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

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

sudo apt-get update

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

sudo apt-get -y install python3-rangehttpserver

Install python3-rangehttpserver Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install python3-rangehttpserver

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

sudo aptitude -y install python3-rangehttpserver

How To Uninstall python3-rangehttpserver on Ubuntu 22.04

To uninstall only the python3-rangehttpserver package we can use the following command:

sudo apt-get remove python3-rangehttpserver

Uninstall python3-rangehttpserver And Its Dependencies

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

sudo apt-get -y autoremove python3-rangehttpserver

Remove python3-rangehttpserver Configurations and Data

To remove python3-rangehttpserver configuration and data from Ubuntu 22.04 we can use the following command:

sudo apt-get -y purge python3-rangehttpserver

Remove python3-rangehttpserver configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge python3-rangehttpserver

References

Summary

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