In this post, we will see installation methods used in Linux distributions

When you use Linux, there are be different methods of software installation. Some of the methods I will try to cover in this post Before we learn about the package managers, let’s see what they do for us

Package managers

  • Package managers help us to install, uninstall Linux software from the trusted repositories
  • They also help us to fetch dependencies required to install the current package to install in a single command
  • They help to standardise the locations and configuration files at a fixed location decided by the Linux distribution

Using package managers

Package managers

We have something called Debian Package Management System which is base for most of the Debian based Linux distributions systems. Under this, we use different package managers

Apt (Advanced packaging tool)

Some of the commands and its usage are as follows

CommandUsage
sudo apt updateUpdate package database
sudo apt upgradeUpgrade all system packages
sudo apt update && <br>sudo apt upgrade -yUpdate and Upgrade in single command
sudo apt install <package_nameInstall specifid package
sudo apt removeRemove package
sudo apt purgeRemoves package including its the configuration files
`sudo apt search ``Search for package information in package database
`sudo apt show <package_name>``Shows the contents of the package
sudo apt list --upgradeableShows all packages for which updates are available
sudo apt list --installedShows list of installed packages
sudo apt autoremoveRemove useless packages which got installed with other softwares but now not needed

Aptitude Package Manager this works similar like apt package manager

CommandUsage
aptitude install <package_name>Install <package_name>
aptitude search <package_name>Search <package_name>
aptitude search ~iList installed packages
aptitude remove <package_name>Remove <package_name>
aptitude search ~D<package_name>List reverse dependencies
aptitude versions <package_name>Print information on priorities for <package_name>
aptitude show <package_name>Show package information for <package_name>
aptitude source <package_name>Download <package_name>’s sources
  1. Using dpkg tool

Next comes RPM (Red Hat Package Manager)

Here we have YUM (Yellowdog Updater, Modified) which is now updated with DNF – Dandified Yum

CommandUsage
dnf install <pkg>Install package
dnf install httpd-manual -yWhile doing installation it assumes Yes
dnf check-updateCheck for Updates
dnf update <pkg> -yUpdates pkg
dnf download <pkg>Download RMP package
dnf install pkg.rpmInstall local package
dnf remove pkgUninstall package
dnf reinstall pkg -yReinstall package
dnf repolistView the repository informinstallationation
dnf search pkgSearch for specific package information
dnf info pkgSee package information
dnf historyVIew the history of the dnf commands /transcations
dnf clean allClear Cached Information

Pacman Package Manager Arch Linux

pacman is used in arch based distributions like manjaro linux

Common Commands

CommandUsage
pacman -Syu <pkg>Install (and update package list)
pacman -S <pkg>Install only
pacman -Rsc <pkg>Uninstall
pacman -Ss <keywords>Search
pacman -SyuUpgrade everything
installation
Query
CommandUsage
pacman -QeList explictly-installed packages
pacman -QlWhat files does this package have?
pacman -QiiList information on package
pacman -QoWho owns this file?
pacman -QsSearch installed packages for keywords

Orphans

CommandUsage
pacman -QdtList unneeded packages
pacman -Rns $(pacman -Qdtq)Uninstall unneeded packages

Other

CommandUsage
pactree <pkg>What does pkg depend on?
pactree -r <pkg>What depends on pkg?

If you dont like to work with commands, there are also the Graphical Package Managers as shown below

Ubuntu Software Center

Ubuntu-Software-Center

Fedora Software center

Fedora Software Center

Synaptic Package Manager

Synaptic Package Manager

Pamac Manager

Pamcmanager