Date: Jan 12, 2024
Mastering Package Managers Yum, DNF, or Apt
Introduction
What are Package Managers?
According to Wikipedia Package Managers are a collection of software tools that automates the process of installing, upgrading, configuring, and removing computer programs for a computer in a consistent manner. They are responsible for tracking package metadata (such as name, description, version, checksum, and dependencies associated with specific packages) across various databases, allowing the tool to install and run them properly.
Package Managers
Debian: dpkg
,
apt-get
,
apt
RHEL: rpm
dnf
yum
Arch:
packman
How to use Debian based package managers?
- dpkg
-
# dpkg -i package_name.deb # Installing package
-
# dpkg -r package_name.deb # Removingpackage
-
# dpkg -P package_name.deb # Purging package
-
# dpkg -l package_name.deb # List all the installed packages
-
# dpkg -s package_name.deb # Show packages info
- apt (or apt-get)
-
# sudo apt[or apt-get] install package_name # Installing package
-
# sudo apt[or apt-get] remove package_name # Removingpackage
-
# sudo apt[or apt-get] purge package_name.deb # Purging package
-
# sudo apt[or apt-get] list package_name.deb # List all the installed packages
-
# sudo apt[or apt-get] search package_name.deb # Search packages info
How to use REHL based package managers?
- rpm
-
# rpm -i package_name.rpm # Installing package
-
# rpm -e package_name # Removing package
-
# rpm -e --nodeps package_name # Purging package (force removal)
-
# rpm -qa # List all installed packages
-
# rpm -qi package_name # Show package information
- dnf (or yum)
-
# sudo dnf install package_name # Installing package
-
# sudo dnf remove package_name # Removing package
-
# sudo dnf remove package_name # Purging package (also removes configuration files)
-
# sudo dnf list installed # List all installed packages
-
# sudo dnf info package_name # Show package information
Conclusion
For more help check the man page man apt