Debian

How to Use apt to Install Multiple Programs from the Command Line in Debian 11

APT (Advanced Packaging Tool) is a powerful package management tool that allows users to install, update, upgrade, or remove packages on the system. It uses the command line terminal to install or manage packages from the system repository. The apt command not only installs a single package at one time, but you can also use the apt command to install multiple packages at the same time.

Follow this article’s guide to learn the use of apt to install multiple programs from the command line in Debian.

How to Use apt to Install Multiple Programs From the Command Line in Debian 11

Using the apt command to install multiple programs on the Debian terminal is a straightforward task and it can easily be done using the following syntax.

sudo apt install <package1> <package2>

The users just have to provide the package’s name to begin installing them on the system.

In the below example, I am using the apt command to install vlc and handbrake packages simultaneously with the single command:

sudo apt install vlc handbrake

Note: The packages you are going to install must be there in the official Debian repository.

Once the process of installation is finished, you can launch them from the app menu or through the command line as well.

The apt command also allows the users to install more than 2 packages with a single execution of a command. The syntax of the command is as follows:

sudo apt install <package1> <package2> <package3>

Replace package1 with the desired name of the package. I am using the above command to install vlc, handbrake, and gdebi on my Debian 11:

sudo apt install vlc handbrake gdebi

Note: In a similar way, you can add multiple packages name and perform the installation using a single command. You can also add a “-y” flag with the above commands to approve the installation of packages on Debian.

Use apt to Remove Multiple Programs From the Command Line in Debian 11

You can also remove multiple programs at the same time using the apt command from the following syntax:

sudo apt remove <package1> <package2>....

For example, I am removing the installed packages vlc and handbrake from the system:

sudo apt remove vlc handbrake

Note: You can also use the “autoremove” and “–purge” commands to perform the removal of multiple programs from Debian.

Bottom Line

APT provides the command line tools in Debian for managing the packages. The most common command used by Linux users in Linux is apt install. The apt command provides the facility to install multiple packages at once. Just execute the apt install command in the terminal with the desired package names to successfully install them on Debian.

About the author

Zainab Rehman

I'm an author by profession. My interest in the internet world motivates me to write for Linux Hint and I'm here to share my knowledge with others.