How to tell which repositories provide which packages?

Tom H tomh0665 at gmail.com
Fri Jan 8 21:18:13 UTC 2021


On Wed, Jan 6, 2021 at 8:19 AM Ralf Mardorf via ubuntu-users
<ubuntu-users at lists.ubuntu.com> wrote:
>
> Another idea, only listing the package names and nothing else,
> assuming the Ubuntu flavour installs are x86_64 only nowadays.
>
> One package per line...
>
> [weremouse at moonstudio ~]$ dpkg -l $(awk '$1 == "Package:" { print $2 }' /var/lib/apt/lists/*webupd8*amd64_Packages) 2>/dev/null | grep ii | awk '{print $2}' | sed 's/:amd64//g'
> audacious
> audacious-plugins
> audacious-plugins-data
> libampache-browser
> libaudcore5
> libaudgui5
> libaudqt2
> libaudtag3
> python-twodict
> youtube-dlg
>
> ...or all packages by one line
>
> [weremouse at moonstudio ~]$ echo $(dpkg -l $(awk '$1 == "Package:" { print $2 }' /var/lib/apt/lists/*webupd8*amd64_Packages) 2>/dev/null | grep ii | awk '{print $2}' | sed 's/:amd64//g')
> audacious audacious-plugins audacious-plugins-data libampache-browser libaudcore5 libaudgui5 libaudqt2 libaudtag3 python-twodict youtube-dlg

You can combine "grep ii | awk '{print $2}'" (which should be "grep
^ii | awk '{print $2}'") into "awk '/^ii/ {print $2}'.




More information about the ubuntu-users mailing list