How to tell which repositories provide which packages?

Tom H tomh0665 at gmail.com
Sat Jan 9 15:11:51 UTC 2021


On Fri, Jan 8, 2021 at 10:18 PM Tom H <tomh0665 at gmail.com> wrote:
> 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}'.

You can also use

$ apt-cache madison $(dpkg -l $(awk '$1 == "Package:" { print $2 }'
/var/lib/apt/lists/*hirsute*_Packages) 2>/dev/null | awk '/^ii/ {
print $2 }')
accountsservice | 0.6.55-0ubuntu13.2 |
https://fr.archive.ubuntu.com/ubuntu hirsute/main amd64 Packages
accountsservice-ubuntu-schemas | 0.0.7+17.10.20170922-0ubuntu1 |
https://fr.archive.ubuntu.com/ubuntu hirsute/universe amd64 Packages
       acl |   2.2.53-8 | https://fr.archive.ubuntu.com/ubuntu
hirsute/main amd64 Packages
acpi-support |      0.143 | https://fr.archive.ubuntu.com/ubuntu
hirsute/main amd64 Packages
     acpid | 1:2.0.32-1ubuntu1 | https://fr.archive.ubuntu.com/ubuntu
hirsute/main amd64 Packages
   adduser | 3.118ubuntu4 | https://fr.archive.ubuntu.com/ubuntu
hirsute/main amd64 Packages
...




More information about the ubuntu-users mailing list