Re: dpkg and apt status files.
Raphael Hertzog <email@example.com> writes:
> On Mon, 09 May 2011, Ciaran Carthy wrote:
>> quickly rebuilds it to its full size. Does it rebuild it by trawling
>> through the repository again?
> AFAIK yes.
Actually apt-get, apt-cache, ... use them if they are current, rebuild
them if they have write access and otherwise just rebuild them in
memory. It is purely an optimization to avoid having to parse the
Packages/Sources files on every invocation.
>> What is it used for/what does it contain? It would seem to be
>> redundant based on what the next two files are used for.
> It's the list of available packages known to APT.
>> In the /var/lib/dpkg directory there are two important files:
>> *available *and *status*.
>> This seems to be the definitive source for determining that a
>> package is installed.
>> What is "available" for and how is it built up?
>> My understanding is that dpkg does not have the concept of a
>> configured remote repository.
>> So in the world of dpkg, what does it mean to say that a package is
> The available file is mainly useful for dselect. It's maintained by dpkg
Is anything but dselect using this (not just filling it like dpkg but
actually using it)?
> but fed by external programs/scripts via "dpkg --update-avail" (and/or
> --merge-avail). For historical reasons, it also keeps the information of
> packages that have been installed in the past (dpkg -i adds the info both
> to the available file and to the status file).
> This file is not used by APT.
If you do not use dselect you can save some disk space by running dpkg
--clear-avail. One can even add this as hook to apt-conf.d so it doesn't
kepp growing back.