Solaris vs RHEL - Package Management differences

This article provides a quick comparison between the package management commands of Solaris 11 (pkg) and the Red Hat (yum)

Check available repositories on serverpkg publisheryum repolist all

PurposeSolaris 11RHEL 7
Install a package pkg install <pkg-name> yum install <-pkg-name>
Remove a package pkg uninstall <pkg-name> yum remove <pkg-name>
List all available and installed packages pkg list yum list
Get information about a package pkg info <pkg-name> yum info <pkg-name>
Search package pkg search <pkg-name> yum seach <pkg-name>
Check pkg history pkg history yum history
Check whether updates of packages are available pkg update -nv yum check-update
Get repository information pkgrepo info -s <URI> yum repoinfo
Check dependencies pkg contents pkg search yum deplist <pkg-name>
Downgrade package version pkg mediator <options> yum downgrade
Which file belongs to package pkg contents <options> yum provides <filename>