Categories: UbuntuUbuntu Feed

How to List All Packages Available in a Repository on Ubuntu

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.

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.

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.

The post How to List All Packages Available in a Repository on Ubuntu appeared first on TecAdmin.

Ubuntu Server Admin

Recent Posts

What is RDMA over Converged Ethernet (RoCE)?

Previous articles walked through RDMA (Remote Direct Memory Access) as a programming model and InfiniBand…

16 hours ago

🚀 How to Deploy Cosmos Cloud on Ubuntu VPS

This article provides a guide to deploy Cosmos Cloud on Ubuntu VPS. What is Cosmos…

2 days ago

Beyond tokens per watt – using Ubuntu 26.04 LTS for AI

Tokens per watt (TpW) – the measure of useful AI work produced per watt of…

5 days ago

Small PRs, big speedups: The Ruby performance work you almost missed

Normally I just fire off a tweet when I spot a nice performance PR landing…

5 days ago

A look into Ubuntu Core 26: Deploying AI models on Renesas RZ/V series for production

Welcome to this blog series which explores innovative uses of Ubuntu Core. Throughout this series,…

6 days ago

RISC-V profiles – why is RVA23 significant?

Introduction One of the important offerings of the RISC-V Instruction Set Architecture (ISA) is the…

6 days ago