12

I have been looking how to list all packages from a repository and I couldn't find it.

For example, I add a repository (sudo add-apt-repository ppa:noobslab/icons) and I want to list all its packages (from console).

I want to do it in a Debian based distro.

2
  • Synaptic's nice GUI can do it...
    – Xen2050
    Commented May 5, 2016 at 12:12
  • Thanks for all your comments, but...there is no way to looking it from console with a command??
    – bmz
    Commented May 6, 2016 at 6:36

1 Answer 1

10

The packages list are in /var/lib/apt/lists/.

Check the name of the repository there.

For example, if the repository is called ppa.launchpad.net_autostatic_doubango then:

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

will give you the list.

You have to make an apt-get update before issuing this command to be sure that the list is updated to the latest status of the repository.

6
  • Thanks for all your comments, but...there is no way to looking it from console with a command??
    – bmz
    Commented May 6, 2016 at 6:36
  • @bmz does this not work?
    – Xen2050
    Commented May 6, 2016 at 7:01
  • yes, this is the best solution I have at the moment.
    – bmz
    Commented May 6, 2016 at 7:07
  • 1
    Here's a copy and pastable command based on this answer for "everything" find /var/lib/apt/lists/ -type f | xargs --delimiter '\n' --max-args=1 cat | grep --text Package: | wc -l Commented Apr 14, 2023 at 19:48
  • 1
    This answer also helped me understand what exactly apt search is grepping through. Commented Apr 14, 2023 at 19:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .