[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Why is /var/lib/apt/lists not in /var/cache?



On Mon, Dec 18, 2023 at 09:05:22AM -0500, Stefan Monnier wrote:
> > I would imagine that it's due to the FHS (Filesystem Hierarchy Standard)
> > which defines what the various directories on a "typical Linux system" are
> > for. "man hier", for example, tells me that:
> >
> > * /var/cache - Data cached for programs.
> >
> > * /var/lib - Variable state information for programs.
> 
> These leave open the question of what "data cached for the program" mean
> and what "Variable state" means.
> 
> Another way to look at it is in terms of what it implies.
> For me, `/var/lib` data is data that is important to keep, e.g. data you
> definitely don't want to delete/lose without a very good reason, whereas
> `/var/cache` is data that's handy to have but not indispensable because
> we can reconstruct it (or something close enough) from other sources,
> which means that it doesn't have to be included in backups and it can
> be deleted if it strikes your fancy (typically when you're in urgent need
> of a tiny bit more disk space).

[...]

Most probably you are right, especially since TLDP only says you can
delete /var/cache's content safely across reboots [1]. The apt lists
will be regenerated after doing an apt-get update, so...

OTOH it'd be only a true-real-honestly-promised cache if every apt
command did an apt-get update whenever it found that file missing.

Cheers

[1] https://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/var.html
-- 
t

Attachment: signature.asc
Description: PGP signature


Reply to: