How can I list contents of a package in remote repository?

kenJackson

Member
Joined
Mar 11, 2019
Messages
55
Reaction score
46
Credits
0
How can I list the contents of a package in the repository without installing it?

On Fedora, I can use this command to examine hexedit, for example:
Code:
dnf repoquery -l hexedit

Is there an equivalent for Ubuntu?
 


wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
8,948
Reaction score
7,919
Credits
37,685
G'day Ken (have I welcomed you yet? If not) & welcome to linux.org :)

Code:
apt-file list $pattern

should do the trick.

For $pattern, substitute eg "hexedit" without the quotes.

apt-file will likely need to be installed and updated first

Code:
sudo apt install apt-file

sudo apt-file update

apt-file list hexedit

The update could take a minute or two depending on your download connection.

You can read on apt-file examples here

https://www.computerhope.com/unix/apt-file.htm

... and I find a good guide to navigating between the Linux Families is with Arch here

https://wiki.archlinux.org/index.php/Pacman/Rosetta

Cheers

Chris Turner
wizardfromoz
 
OP
kenJackson

kenJackson

Member
Joined
Mar 11, 2019
Messages
55
Reaction score
46
Credits
0
Thank you, oh great and mighty wizard! Indeed, apt-file was exactly what I was looking for.

It's a shame I now have to do separate updates for apt-get and apt-file. But no matter, I've added it all into my universal script that figures out what platform I'm on and does the right thing. The apt-get section is now complete.

I wish I had seen that Pacman/Rosetta page a couple years ago. I've already figured out most everything for the first three platforms. I've never used SUSE or Gentoo.
 

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
8,948
Reaction score
7,919
Credits
37,685
Big Like :D

Thank you, oh great and mighty wizard! Indeed, apt-file was exactly what I was looking for.

Does that mean the check is in the mail?

Interestingly enough, I was researching a matter today for a Member, which led me to an openSUSE page, and even they recommended the Pacman/Rosetta page.

I feel it's priceless.

Enjoy your Linux, I do. ;)

Wiz
 

Members online


Top