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

Re: Cost of packages in disk space?



Le Lun 25 février 2013 16:23, green a écrit :
> "Morel Bérenger" wrote at 2013-02-25 03:18 -0600:
>
>> Le Dim 24 février 2013 23:02, Alois Mahdal a écrit :
>>
>>> *   Do we want to count dependencies?  How deep (we don't want
>>> to count libc* 10000 times, do we)?
>>>
>>> *   Do we want to separately address
>>> *   `purge`able ~/.app-data?
>>> *   /etc/app/settings?
>>> *   /var/logs/app?
>>>
>>>
>>>
>>> *   Or are we looking for more sophisticated advice like "hey,
>>> do you know that libhuge is required only by this hardlyeverused-app"?
>>>  ("think about upgrade costs, dude!")
>>>
>>
>>> Typical use case is when one is running out of disk space
>>> on / or /usr/.  Such tool could be applied in much wider sense,
>>> though.
>>
>> Using aptitude with it's gui will give you those data.
>>
>
> aptitude only provides per-package compressed/installed sizes (probably
> not including any config/log files generated by the package) and sizes for
> applying a package set change (eg. when upgrading).  I do not know of a
> way to obtain sophisticated information about the disk space a package
> requires, as in the examples and scenarios quoted; it certainly would at
> times be useful to have such a utility.
>

I see what you mean, but how the hell could aptitude know the weight of
logs or user data (/var and /home) ?

For var, wikipedia says:
/var	Variable files?files whose content is expected to continually change
during normal operation of the system?such as logs, spool files, and
temporary e-mail files.

For home:
/home	Users' home directories, containing saved files, personal settings,
etc.

In my opinion, package softwares should not touch $HOME at
installation/purge because a user might want to use that configuration
later (on another system by example, or with a different version he will
install at hand later, or maybe it is already used by various
softwares...).
However it might be useful to have other tools to do that particular job.

For /etc, it is taken into account.
Install a software, remove them, and then take a look at what it would
give you if you purge it.
IIRC aptitude will say you how many space it frees in case or purge and
this will differ from removal. But I bet you will not see big differences,
considering the average weight of a configuration file (less than 10KB)
against the entire software.
But, well, at installation time, it does not say you how many space is
used in /etc, so if you want such a granularity, you can not have it with
aptitude, AFAIK. I'm not sure you will really find it useful anyway.

About your problem, to have more detailed informations, I see this solution:
deb are simple archives. Decompressing them, and then evaluate the weight
of each folder (df --max-depth=1 in the folder should be ok). You will
then have some details... but they might be wrong, since an installation
script could generate or download data (some games do that, and another
example is flash player).

Hope it helps.


Reply to: