【转载】ubuntu在终端列出已安包的包列表(How to List Installed Packages on Ubuntu)
apt is a command line interface for Ubuntu package manager.
Apt List Installed Ubuntu Packages
To list all the installed packages, use following command...
sudo apt list --installed
To count, you can just pipe the above output to wc -l
sudo apt list --installed | wc -l
781
Of course you can pipe to any Unix command. Examples...
sudo apt list --installed | less
sudo apt list --installed | egrep <pkg_name>
划重点: sudo apt list --installed | grep xxx
Dpkg-query List Installed Ubuntu Packages
dpkg-query is old way of querying installed packages on Ubuntu. The command is still available on newer versions too.
To list installed packages, run following command...
sudo dpkg-query -l
And the pipe commands can be used to narrow down the results....
sudo dpkg-query -l | less
sudo dpkg-query -l | egrep <pkg_name>
原文链接:
https://www.ultralinux.org/post/how-to-list-installed-packages-on-ubuntu/
本文来自博客园,作者:imzhi,转载请注明原文链接:https://www.cnblogs.com/imzhi/articles/ubuntu-list-installed-packages.html

浙公网安备 33010602011771号