Package Management
Modern Linux distributions primarly use a Software Manager, a centralized system, automating installing, updating, configuring and uninstalling software.
The package manager stores the program's executable, libraries and configuration into a single archive, called a package.
Two prevelant format standards are
.deb(for Debian distros) and.rpm(for RedHat distros).On desktop invironments there is a GUI package management system.
Programs depend on third party libraries. Those dependencies are handled by the package manager automatically.
Debian
There are many package management tools, but two of them are primarly used.
dpkg
dpkg- low level tool
dpkg -i package_name.debapt
apt- commandline package manager. It provides commands for searching, managing, querying information about packages.
sudo apt update
# update list of available packages
sudo apt upgrade
# upgrade packages and O.S. (download and installation)
sudo apt search package_name
# search for package if present
sudo apt search duf
Sorting... Done
Full Text Search... Done
duf/jammy 0.6.2-1build1 amd64
Disk Usage/Free Utility
sudo apt show duf
# Show "duf" package information
# Packages can be in transitional status
sudo apt install package_name
# install the package, the use needs to be root
sudo apt remove package_name
# remove the package, NOT the dependencies/config files
sudo apt purge package_name
# remove the package including all configuration files
sudo apt autoremove
# Remove unused packages/dependencies
sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y
# One line to update packages, O.S. and clean unneeded depencencies
Red Hat
rpm
rpm- low level tool
yum
yum- packaging system used by RedHat distros
Manual Installing
Some software do not have a package for the used distribution. The alternative is to download the source code of the programs and compile it.
First thing, install the tools necessary to build the software:
Install
gitmanually (git download page):
checkinstall
Instead of
sudo make install,checkinstalltool can be used.It keeps track of all files installed by a "make install", creates rpm/deb package with those files and adds it to the installed packages database.
Last updated
Was this helpful?