Term
Install a package with YUM
|
|
Definition
yum install <package name> |
|
|
Term
|
Definition
rpm -ivh <package name>
Note: -h -v are not necessary, as -i is the install switch, but the -h -v switches will provides output during install, which most people like. |
|
|
Term
Update all packages with YUM
|
|
Definition
yum update
or
yum upgrade
'yum update' and 'yum upgrade' both update all the presently installed packages to the latest versions that are available in the repositories. However, once finished, 'yum upgrade' also removes all of the obsolete packages from the system. In short, update does NOT remove packages and upgrade does remove packages. |
|
|
Term
|
Definition
yum remove <package name> |
|
|
Term
remove a package with RPM |
|
Definition
rpm -e <package>
if you want to remove the package but not the dependencies you can use
rpm -e --nodeps
For more output logging use -v the verbose switch. |
|
|
Term
update a single package with YUM |
|
Definition
yum update <pacakge>
or
yum upgrade <package>
'yum update' will not remove obsolete packages from the system. |
|
|
Term
search for available packages by keyword using yum |
|
Definition
|
|
Term
|
Definition
|
|
Term
Display detailed information about a package with YUM |
|
Definition
|
|
Term
|
Definition
|
|
Term
Check for updates without installing them in YUM
|
|
Definition
|
|
Term
Install a group of packages using YUM |
|
Definition
|
|
Term
Remove unused dependencies with YUM |
|
Definition
|
|
Term
List enabled and disabled repositories in YUM |
|
Definition
|
|
Term
Generate metadata cache in YUM |
|
Definition
|
|
Term
|
Definition
Over time, YUM accumulates cache data that can take up disk space. Running 'yum clean all' frees the space. However, caching repositories is good for performance so it is not bad to run 'yum makecache' to also download and cache metadata for enabled repositories. |
|
|
Term
how to find RPM package which contains particular script, application or command using YUM |
|
Definition
yum provides <filename or command> |
|
|
Term
Updating the package database in apt (not updating software just the repository)
|
|
Definition
|
|
Term
Upgrade all packages using apt |
|
Definition
apt upgrade
or
apt full-upgrade
full-upgrade works the same as upgrade except that if system upgrade needs the removal of a package already installed on the system, it will do that. Whereas, the normal upgrade command won’t do this. |
|
|
Term
What is the difference between apt update and apt upgrade? |
|
Definition
apt update only updates the database of the packages
apt upgrade will upgrades the installed packages to the newer version
You can combine them to update the database and then upgrade the packages to ensure you get the latest software updates
apt update && apt upgrade -y |
|
|
Term
Install a package with apt |
|
Definition
apt install <package>
or to install multiple packages
apt install <package_1> <package_2> <package_3> |
|
|
Term
install a package, but don’t want to upgrade, it if it is already installed in apt |
|
Definition
apt install <package_name> --no-upgrade |
|
|
Term
only upgrade packages, not install them using apt |
|
Definition
apt install <package> --only-upgrade |
|
|
Term
How to install a specific version of an application using apt
|
|
Definition
apt install <package>=<version_number> |
|
|
Term
How to remove installed packages with apt |
|
Definition
apt remove <package>
or
apt purge <package>
apt remove just removes the binaries of a package. It leaves residue configuration files.
apt purge removes everything related to a package including the configuration files. |
|
|
Term
Search for packages in apt |
|
Definition
|
|
Term
|
Definition
|
|
Term
See all installed packages using apt |
|
Definition
|
|
Term
List all upgradable packages using apt |
|
Definition
|
|
Term
Using apt how do you removes libs and packages that were installed automatically to satisfy the dependencies of an installed package. If the package is removed. |
|
Definition
|
|
Term
See all installed applications using RPM |
|
Definition
rpm -qa
often piped to grep to search for an installed app, e.g. rpm -qa | grep firefox |
|
|
Term
Check for an installed package using RPM
|
|
Definition
|
|
Term
List all files of an installed RPM package using RPM
|
|
Definition
|
|
Term
List Recently Installed RPM Packages using RPM |
|
Definition
|
|
Term
Upgrade a RPM Package using RPM
|
|
Definition
rpm -Uvh <package>
-U is the upgrade switch. The -v and -h provide for verbose output, which many admins prefer.
|
|
|
Term
See information for installed RPM using RPM |
|
Definition
rpm -qi <package>
To get the Information of RPM Package Before Installing use:
rpm -qip <package> |
|
|
Term
Verify an RPM Package package for an installed rpm (compare information of installed files of the package against the rpm database) |
|
Definition
rpm -Vp <package>
To verify all the installed packages use -a with no arguments
rpm -Va |
|
|
Term
Import an RPM GPG key in RPM |
|
Definition
|
|
Term
Rebuild Corrupted RPM Database |
|
Definition
- cd /var/lib
- rm __db*
- rpm --rebuilddb
- rpmdb_verify Packages
|
|
|
Term
What are the different commands for DNF (Dandified YUM) compared with YUM (Yellowdog Updater Modified)? |
|
Definition
For basic package management routines, these YUM and DNF commands adhere to the same syntax, e.g. installing a package is yum install <package> and dnf install <package> respectively.
However, dnf has some additional transactional commands
dnf history (list history of dnf commands)
dnf history undo <history id> |
|
|
Term
dpkg command to install a DEB package |
|
Definition
dpkg -i <package>
or
dpkg --install <package> |
|
|
Term
dpkg command to remove a DEB package |
|
Definition
dpkg -r
or
dpkg --remove
or
dpkg -P
or
dpkg --purge
-r or --remove removes every file belonging to the specific package except the configuration files. -P or --purge completely removes every fie belonging to the specific package, including the configuration files. This is the complete uninstall option. |
|
|
Term
list all DEBs installed via dpkg |
|
Definition
|
|
Term
Difference between RPM and YUM/DNF
Difference between dpkg and apt or apt-get |
|
Definition
RPM and dpkg are low level package managers. YUM, DNF, APT and APT-GET are high-level package managers. In order to perform the task of package management effectively, you need to be aware that you will have two types of available utilities: low-level tools (which handle in the backend the actual installation, upgrade, and removal of package files), and high-level tools (which are in charge of ensuring that the tasks of dependency resolution and metadata searching -”data about the data”- are performed).
DISTRIBUTION |
LOW-LEVEL TOOL |
HIGH-LEVEL TOOL |
Debian and derivatives |
dpkg |
apt-get / aptitude |
CentOS |
rpm |
yum/dnf |
openSUSE |
rpm |
zypper |
|
|
|
Term
Update all packages using YUM without being prompted |
|
Definition
yum update -y
or
yum upgrade -y
Upgrade will remove obsolete packages from your system and update will not. |
|
|
Term
RPM command to list configuration files for a package |
|
Definition
|
|
Term
Find package associated with a command using RPM |
|
Definition
rpm -qf /path/to/commandbinary |
|
|