How To Install colcon on Debian 12

Learn how to install colcon on Debian 12 with this tutorial. colcon is collective construction meta build tool

Introduction

In this tutorial we learn how to install colcon on Debian 12.

What is colcon

colcon is:

This package is part of ROS 2, the Robot Operating System. colcon is a meta build tool to improve the workflow of building, testing and using multiple software packages. It is the recommended tool for ROS 2 to set up workspaces and build packages from source, but can also handle old ROS 1 workspaces.

This package installs the main colcon executable.

There are three methods to install colcon on Debian 12. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install colcon Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install colcon

Install colcon Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install colcon

Install colcon 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 Debian. Update apt database with aptitude using the following command.

sudo aptitude update

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

sudo aptitude -y install colcon

How To Uninstall colcon on Debian 12

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

sudo apt-get remove colcon

Uninstall colcon And Its Dependencies

To uninstall colcon and its dependencies that are no longer needed by Debian 12, we can use the command below:

sudo apt-get -y autoremove colcon

Remove colcon Configurations and Data

To remove colcon configuration and data from Debian 12 we can use the following command:

sudo apt-get -y purge colcon

Remove colcon configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge colcon

Dependencies

colcon have the following dependencies:

References

Summary

In this tutorial we learn how to install colcon package on Debian 12 using different package management tools: apt, apt-get and aptitude.