How to Install and Uninstall apt-src Ubuntu 22.04

Updated: October 14, 2022

apt-src is a command line interface for downloading, installing, upgrading, and tracking Debian source packages. It makes source package management feel a lot like using apt to manage binary packages, and is being used as a testbed to work on adding source dependencies to Debian. I will show you how to install apt-src on Ubuntu 22.04 in this guide.

Requirements

  • OS: Ubuntu 22.04 or older Ubuntu versions
  • Privileges: Make sure you are able to execute sudo commands.

Prerequisites to install apt-src on Ubuntu 22.04

Install apt-src Ubuntu 22.04

apt-src is one of the popular ways on Ubuntu now so that this tutorial will show you some ways to install it. Choose the one that you think is easy and you can follow.

Install apt-src using APT

This is one of the popular ways to install any Ubuntu packages because it’s easy to follow, even if you are a newbie in Linux. Following these steps to get apt-src on your Ubuntu.

Step 1: The APT package repository cache needs to be updated before you try to install, update, or remove any packages. Update the APT database to fetch new packages from Ubuntu. Opening the terminal and executing the following Linux command:

sudo apt -y update

Step 2: Start the package installation on Ubuntu 22.04. After updating, you can install apt-src Ubuntu by executing this command in the terminal.

sudo apt install apt-src

Install apt-src using Aptitude

You must run this command to install Aptitude if you haven’t already done so on Ubuntu.

sudo apt -y install aptitude

After installing, you can now install apt-src, just following these steps:

Step 1: The APT package repository cache needs to be updated before you try to install, update, or remove any packages. Obtain new packages from Ubuntu by updating the APT database. Launching the terminal and entering the following Linux command:

sudo apt-get update

Step 2: Start the package installation on Ubuntu 22.04. You can now install apt-src Ubuntu by executing this command in the terminal.

sudo aptitude install apt-src

Uninstall apt-src on Ubuntu 22.04

Have you ever considered how challenging it might be to uninstall an application from Ubuntu? You’re wrong, anyone can easily uninstall any program, not just a apt-src.

If you installed apt-src using APT or Aptitude, you could uninstall apt-src on Ubuntu by running this command

sudo apt remove --auto-remove apt-src

You can also execute this command if you want to uninstall apt-src and remove its data and dependencies:

sudo apt autoremove --purge apt-src

Conclusion

In this tutorial, I showed you ways to install apt-src on Ubuntu 22.04 and some ways to uninstall apt-src too. Please do not hesitate to contact me if you require any assistance. I’m delighted to respond to them.