Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»General Articles»How to List All Packages Available in a Repository on Ubuntu

    How to List All Packages Available in a Repository on Ubuntu

    By RahulOctober 4, 20202 Mins ReadUpdated:October 5, 2020

    APT or Advanced Package Tool is an software package used to install, update and remove packages on Debian based systems. It is the default package manager on Ubuntu and Debian based systems. The apt, apt-get and apt-cache are quickly used commands to manage packages and configuration on system.

    Advertisement

    Apt don’t provide any command to list available package under the specific repository. But you can find the list from a cache file, which contains list of available package to that repository with other details.

    This tutorial will help you to find all the available packages in a repository on Ubuntu and other Debian based systems.

    Find Packages Details in Repository

    Apt keeps all repository cache files under /var/lib/apt/lists directory. So, first update the apt cache on your system

    sudo apt-get update 
    

    Now, navigate to /var/lib/apt/lists directory. Then search for the file with the repository name, path and architecture, ends with _Packages in there name.

    See the content of *_Packages to view details about all packages available under that repository.

    List available packages in a repository on Ubuntu and Debian

    To list the packages only available in file, execute below like:

    grep -h -P -o "^Package: \K.*" /var/lib/apt/lists/ppa.launchpad.net_*_Packages | sort -u 
    

    Conclusion

    In this article, you have learned to find all the available packages in a specific repository.

    apt apt-get debian Ubuntu
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    Error: EACCES: permission denied, scandir (Resolved)

    How To Install Python 3.11 on Ubuntu 22.04 / 20.04

    Excluding URLs from ProxyPass in Apache

    Add A Comment

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • Error: EACCES: permission denied, scandir (Resolved)
    • How To Install Python 3.11 on Ubuntu 22.04 / 20.04
    • How to Install Python 3.11 on Amazon Linux 2
    • An Introduction to the “./configure” Command: Compiling Source Code in Linux
    • How to Install PHP 8.x on Pop!_OS
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.