Hi guys. I've searched the man pages for apt, as well as searched online in vain: I'd like to identify what package a particular deb file belongs to in the repo, preferably in some kind of scriptable way, or else download specific deb files (not packages) using apt.

The specific use-case that I have is that I want to use apt to download-only into my cache common packages that I might need / want to install offline, using the data from the debian package popularity contest. There are lists of what .deb files are contained on the official DVD's here: https://cdimage.debian.org/debian-cd/cu ... /list-dvd/ but unfortunately they list the names of all the individual deb files, and not the packages themselves.

Is there an alternative list that lists package names, or a way to lookup the corresponding package for a particular deb file? Alternatively, if there is a way to download specific deb files (not packages) using apt or some similar tool able to process a long list of .deb files I want to download, I'm open to this as well.

Ah! That looks like what I want, but I just noticed that I'd have to have the deb file downloaded already, which kind of defeats the point: I'd like to download all of the deb files contained within that dvd-list manually, whether by downloading the containing package with apt, or just somehow searching for and downloading the individual debs in the repos directly (in an automated way, of course).

I was thinking of something like "apt search-deb <deb file>" and "apt download-only-deb <.deb file>"

Unless you are meaning meta packages, the .deb file, as you call it, is the package.

After you have downloaded all those packages, you will have a static (single point in time) cache and as soon as any of the packages have been upgraded, your cache will only have the old version. You would still have to connect to the repositories to keep your system up to date, in other words, upgraded for security.

But, I don't understand why the popcorn list you mention is any more useful than what bw123 suggested which has them in alphabetical order.

Perhaps I misunderstand what you are trying to accomplish but generally it is better to keep a system updated and upgraded and let the package manager you choose to use handle that for you.