apt Command In Linux Examples

apt Command In Linux Examples

apt Command In Linux Examples

The apt is the package management tool or command. The functions of apt in Linux are the upgrading of the Linux (Ubuntu),  installation of new software packages, removing of the packages, upgrading of existing software packages, updating of the package list index, and many more.

apt Command In Linux Examples

Install a Package using the apt command:

sudo apt install Package-name

Remove a Package using the apt command, type the following:

sudo apt remove package-name

Install multiple packages using the apt command:

sudo apt install Package-name package-name2

Remove multiple packages using the apt command:

sudo apt remove package-name package-name2

Apt command to update the Package Index:

sudo apt update

apt command to upgrade the system:

sudo apt upgrade

apt command to full upgrade the system:

sudo apt full-upgrade
Upgrade a package using the apt command:
sudo apt upgrade package_name

To see the list of packages that can be upgraded on the system

apt list --upgradable

If you want to remove the package along with its all configuration files, use purge with the apt command:

sudo apt purge package_name

Run the following command to remove the unused package:

sudo apt autoremove

Run the following apt command to list all available packages:

sudo apt list

apt command to list the only installed packages:

sudo apt list --installed

Run the following apt command to search the packages:

sudo apt search package-name

apt command to find info about packages

sudo apt show package-name

apt command to list package dependency

READ More Relevant Stuff:  Fix “Failed to mount ‘/dev/sdax’: Input/output error, NTFS is either inconsistent, or there is a hardware fault, or it’s a SoftRAID/FakeRAID hardware”

sudo apt depends packagename

apt command to remove the dependencies:

sudo apt autoremove

sudo apt --purge autoremove

the apt command is the most used and vital part of the Linux ecosystem. Let us know if you want to add more examples and syntax in this blog post on apt commands in Linux. We are always open to updating this article on apt commands in Linux with your suggestions and tips.

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply

    Your email address will not be published. Required fields are marked *