Searching, Installing, and Removing Packages with Apt
Apt provides a set of commands for searching, installing, and removing software packages on Debian-based Linux systems. In this section, we will explore these fundamental Apt operations.
Searching for Packages
To search for a package using Apt, you can use the apt search
command. This command will search the available packages in the configured software repositories and display the matching results.
sudo apt search <package_name>
For example, to search for the "htop" package on Ubuntu 22.04, you would run:
sudo apt search htop
This will display a list of packages matching the search term, along with a brief description of each package.
Installing Packages
To install a package using Apt, you can use the apt install
command. This command will download the package from the configured software repositories and install it on your system.
sudo apt install <package_name>
For example, to install the "htop" package on Ubuntu 22.04, you would run:
sudo apt install htop
Removing Packages
To remove a package using Apt, you can use the apt remove
command. This command will uninstall the specified package from your system.
sudo apt remove <package_name>
For example, to remove the "htop" package from Ubuntu 22.04, you would run:
sudo apt remove htop
By mastering these basic Apt commands, you can effectively manage the installation, removal, and search of software packages on your Debian-based Linux system.