yum list installed
yum list installed | grep "包的名字"

rpm -qa | grep "包的名字"

deb包安装的

dpkg -l
dpkg -l | grep "包的名字"