Package Manager
A package manager is a tool that allows users to install, remove, upgrade, configure and manage software packages on an operating system. The package manager can be a graphical application like a software center or a command line tool like apt or pacman and dnf.
Quick Overview¶
Fedora¶
To search the repositories for a package type:
dnf search packagename
To install the package:
sudo dnf install packagename
To remove a package:
sudo dnf remove packagename
Other common DNF commands
- autoremove
- removes packages installed as dependencies that are no longer required by currently installed programs.
-
check-update
- checks for updates, but does not download or install the packages. -
downgrade
- reverts to the previous version of a package. -
info
- provides basic information about the package including name, version, release, and description. -
reinstall
- reinstalls the currently installed package. -
upgrade
- checks the repositories for newer packages and updates them. -
exclude
- exclude a package from the transaction.
Ubuntu¶
To search the repositories for a package type:
apt search packagename
To install the package:
sudo apt install packagename
To remove a package:
sudo apt remove packagename
sudo apt purge packagename
Other common APT commands
- autoremove
- removes packages installed as dependencies that are no longer required by currently installed programs.
-
downgrade
- reverts to the previous version of a package. -
upgrade
- checks the repositories for newer packages and updates them. -
show
- Show information about the given package(s) including its dependencies, installation and download size, sources the package is available from, the description of the packages content and much more. -
update
- used to download package information from all configured sources. -
full-upgrade
- full-upgrade performs the function of upgrade but will remove currently installed packages if this is needed to upgrade the system as a whole.
For more visit Using apt Commands | itsfoss. Also read Difference Between apt and apt-get | itsfoss
Arch¶
To search the repositories for a package type:
pacman -Ss packagename
To install the package:
sudo pacman -S packagename
To remove a package:
sudo pacman -R packagename #removes single package leaving dependencies
sudo pacman -Rs packagename # removes packages and its dependencies
Removes orphan packages
pacman -Qdtq | pacman -Rs -
Upgrading packages
pacman -Syu
Other common pacman commands To search for already installed packages:
pacman -Qs string1
To view the dependency tree of a package:
pactree packagename
pactree
, visit pacman | geekdiary. For getting started with pacman visit itsfoss | pacman.