YUM (Yellowdog Update Modified) is the most efficient software package manager for a Red Hat based Linux distribution. The biggest use of this is it takes care of the package dependencies.
Repository: A repository a location whether local or remote location from which your system retrieves and installs OS updates and applications from.
yum repolist all
yum search nmap => searching for a package for nmap
After getting a bunch of packages, you can also get more information about any of them by
yum info package-name command:
Unlike RPM, YUM checks all the dependencies and does the heavy work for you.
yum install -y package-name or
yum install package-name
yum erase package-name or
yum remove package-name
sudo apt autoremove => For Ubuntu or Debian based system which removes all the unused dependencies.
yum list installed
yum check-update | grep nmap => checks an update for a package.
yum update => updates all the packages. But be careful about updating all the packages in a production environment.
To see currently installed package version + check what is the latest available version, use:
sudo yum --showduplicates list 'nmap.*'