列出ubuntu / debian中一个仓库中的所有软件包


Answers:


63

简单:

grep ^Package: /var/lib/apt/lists/ppa.launchpad.net_*_Packages 

或更灵活:

grep-dctrl -sPackage . /var/lib/apt/lists/ppa.launchpad.net_*_Packages 

对于更高级的查询,请按此处所述使用apt-cache policy和:aptitude

aptitude search '~O LP-PPA-gstreamer-developers'

使用xzcat /var/lib/apt/lists/ppa.launchpad.net_*_Packages.xz | grep '^Package:'如果该程序包文件被压缩。
随机性



2

旧线程,但认为可能会有所帮助。使用awk,sort和uniq仅获取软件包,并丢弃Package repo校验和。

grep ^Package /var/lib/apt/lists/<repo you are interested in>* | awk '{print $2}' | sort | uniq
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.