Http://blog.51osos.com/linux/ubuntu-apt-cache-search-package/
Goface explains how to find available software packages in Ubuntu and Linux systems with the same package management. On Ubuntu, you generally use apt-get to install software. If you want to check whether there is any package of software in a repository, you do not use apt-Get search or apt-get-list, use the apt-Cache command.
Apt-cache search string // find the corresponding software package in the source Software List
The following uses the fping package as an example. fping can be pinged using the round-robin method, which is very powerful. goface will introduce in the next blog that the default fping system does not come with it.
#Apt-cache search fping
Fping-sends ICMP echo_request packets to network hosts
Oping-sends ICMP_Echo requests to network hosts
# Apt-cache search fping
Package: fping
Priority: Optional
.......
Description: sends ICMP echo_request packets to network hosts
Fping is a ping like program which uses the Internet Control Message Protocol
(ICMP) echo request to determine if a target host is responding. fping
Differs from Ping in that you can specify any number of targets on the command
Line, or specify a file containing the lists of targets to ping. Instead
Sending to one target until it times out or replies, fping will send out
Ping packet and move on to the next target in a round-robin fashion.
Homepage: http://fping.sourceforge.net/
#Apt-Cache depends fping// Find the packages that fping depends on
Depends: libc6
Conflicts: <suidmanager>
Replaces: <netstd>
#Apt-Get rdepends fping// Find which packages depend on fping
Reverse depends:
Mplayer
DVDRip
Zabbix-server-pgsql
Zabbix-server-MySQL
Zabbix-proxy-pgsql
Zabbix-proxy-MySQL
Whereami
......
Only depends can determine the true dependency, and the reverse dependency is not necessarily reliable. Depends must be installed and recommends is not required. For example, fping is not required by mplayer.
#Apt-Cache depends mplayer
Suggests: fping indicates that fping is required for mplayer.
#Apt-Cache depends zabbix-server-MySQL
The result shows that fping is depends, indicating that fping is required for zabbix-server-MySQL.
In addition, the packages in the line starting with depends or recommends will be installed when apt-Get install package is installed, and the packages in the line starting with suggests will not be installed.