[OpenIndiana-discuss] Is it safe to remove /var/pkg/cache directory?

Predrag Zečević predrag.zecevic.1961 at googlemail.com
Thu Dec 14 15:26:50 UTC 2023


On 2023-12-14 11:52, Toomas Soome via openindiana-discuss wrote:
> 
> 
>> On 14. Dec 2023, at 12:43, Marcel Telka <marcel at telka.sk> wrote:
>>
>> On Thu, Dec 14, 2023 at 11:37:52AM +0100, Aurélien Larcher wrote:
>>> On Thu, Dec 14, 2023 at 10:38 AM Marcel Telka <marcel at telka.sk> wrote:
>>>
>>>> On Thu, Dec 14, 2023 at 09:30:53AM +0100, Predrag Zečević wrote:
>>>>> I understand network - there can be a lot of problems preventing fast
>>>>> download, but *pkg* showing packages decreasing...
>>>>
>>>> Yes, it looks like a bug.  Feel free to file a bugreport.
>>>>
>>>>> Also, is this OK (15GB of OI packages seems too much to me)?
>>>>>
>>>>> :; pfexec du -sh /var/pkg/publisher/*
>>>>> 21M     /var/pkg/publisher/hipster-encumbered
>>>>> 15G     /var/pkg/publisher/openindiana.org
>>>>
>>>> Not sure if it is okay or not.  Here is mine:
>>>>
>>>> # du -sh /var/pkg/publisher/*
>>>> 2.30M   /var/pkg/publisher/hipster-encumbered
>>>> 1019M   /var/pkg/publisher/openindiana.org
>>>> #
>>>>
>>>> I fully update usually at least once a week with a reboot (and new BE).
>>>> This update includes bits from illumos-gate.  I also update daily
>>>> (without reboot) to have always up-to-date userland bits.  I do have
>>>> (almost) all packages installed.  It is my oi and illumos build machine.
>>>>
>>>
>>> I cannot remember which option it is but you can autopurge the cache after
>>> successful install using a pkg property.
>>
>> It was already discussed.  It is flush-content-cache-on-success.
>> I'm not sure if /var/pkg/publisher/openindiana.org is considered as
>> content-cache - see pkg(1) man page.
>>
> 
> This sounds like there must be some external and/or leftover files (cores?). Some of might be possible to clean up with maintenance commands like pkg refresh, purge-history etc. can not really suggest anything specific without knowing pkg internals.
> 
> Of course, one can experiment there — create new BE or backup BE and then you have option for quick recovery;)
> 
> rgds,
> toomas

Hi Toomas,

1) Removing everything under /var/pkg/cache/ directory causes no 
troubles (so I did it and rebooted systems - no issues)

2) Checking usage of 15G under /var/pkg/publisher/openindiana.org (1st 
column is size in bytes) - as you may see, no core files are found:

:; pfexec du -a /var/pkg/publisher/ | sort -n -r | numfmt --field 1 
--from=iec --format "%'12f" | head -35
   14.390.261 /var/pkg/publisher/
   14.384.415 /var/pkg/publisher/openindiana.org
   14.034.569 /var/pkg/publisher/openindiana.org/pkg
    1.886.781 
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Ficonv%2Futf-8
    1.598.110 /var/pkg/publisher/openindiana.org/pkg/system%2Flibrary
    1.137.318 /var/pkg/publisher/openindiana.org/pkg/SUNWcs
      799.780 /var/pkg/publisher/openindiana.org/pkg/system%2Fkernel
      685.860 
/var/pkg/publisher/openindiana.org/pkg/system%2Fdata%2Fterminfo
      667.179 
/var/pkg/publisher/openindiana.org/pkg/system%2Ftest%2Futiltest
      652.333 /var/pkg/publisher/openindiana.org/pkg/system%2Fheader
      549.469 /var/pkg/publisher/openindiana.org/pkg/system%2Ftest%2Fzfstest
      349.839 /var/pkg/publisher/openindiana.org/origins
      349.838 
/var/pkg/publisher/openindiana.org/origins/12dad71d06df371e72f75c488f47c75a13e340d1
      313.290 
/var/pkg/publisher/openindiana.org/origins/12dad71d06df371e72f75c488f47c75a13e340d1/catalog.dependency.C
      230.196 
/var/pkg/publisher/openindiana.org/pkg/system%2Fextended-system-utilities
      230.187 
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Ficonv%2Fxsh4%2Flatin
      230.186 
/var/pkg/publisher/openindiana.org/pkg/service%2Ffault-management
      230.182 
/var/pkg/publisher/openindiana.org/pkg/system%2Fdata%2Fzoneinfo
      230.179 /var/pkg/publisher/openindiana.org/pkg/developer%2Fdebug%2Fmdb
      112.136 /var/pkg/publisher/openindiana.org/pkg/text%2Fdoctools
      104.537 /var/pkg/publisher/openindiana.org/pkg/developer%2Fdtrace
       97.796 
/var/pkg/publisher/openindiana.org/pkg/system%2Fmicrocode%2Fintel
       86.447 /var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Fmath
       82.842 
/var/pkg/publisher/openindiana.org/pkg/system%2Fkernel%2Fplatform
       78.435 /var/pkg/publisher/openindiana.org/pkg/driver%2Fusb
       68.652 /var/pkg/publisher/openindiana.org/pkg/compatibility%2Fucb
       64.735 /var/pkg/publisher/openindiana.org/pkg/service%2Fhal
       62.986 /var/pkg/publisher/openindiana.org/pkg/developer%2Fobject-file
       60.073 
/var/pkg/publisher/openindiana.org/pkg/developer%2Fbuild%2Fonbld
       59.367 /var/pkg/publisher/openindiana.org/pkg/package%2Fpkg
       56.185 /var/pkg/publisher/openindiana.org/pkg/locale%2Fes
       53.514 /var/pkg/publisher/openindiana.org/pkg/locale%2Fen
       53.162 /var/pkg/publisher/openindiana.org/pkg/developer%2Flinker
       51.741 /var/pkg/publisher/openindiana.org/pkg/storage%2Fstmf
       48.852 
/var/pkg/publisher/openindiana.org/pkg/diagnostic%2Fcpu-counters

3) I would like to know, why (in this biggest sub-directory) I get eaten 
10 MBs almost everyday? Any idea?

:; pfexec find 
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Ficonv%2Futf-8 
-type f -ls | numfmt --field 1 --from=iec --format "%'12f" | sort -nr | 
head -25
   10.699.514   3589 -rw-r--r--   1 root     root      3664028 Dec 12 
05:00 
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Ficonv%2Futf-8/0.5.11%2C5.11-2023.0.0.21925%3A20231212T013014Z
   10.693.983   3589 -rw-r--r--   1 root     root      3664028 Dec 11 
05:00 
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Ficonv%2Futf-8/0.5.11%2C5.11-2023.0.0.21923%3A20231211T012541Z
   10.691.465   3589 -rw-r--r--   1 root     root      3664028 Dec 10 
05:00 
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Ficonv%2Futf-8/0.5.11%2C5.11-2023.0.0.21922%3A20231210T012736Z
   10.685.608   3589 -rw-r--r--   1 root     root      3664028 Dec  9 
05:00 
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Ficonv%2Futf-8/0.5.11%2C5.11-2023.0.0.21921%3A20231209T012742Z
   10.684.154   3589 -rw-r--r--   1 root     root      3664028 Dec  8 
05:00 
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Ficonv%2Futf-8/0.5.11%2C5.11-2023.0.0.21917%3A20231208T012433Z
   10.674.921   3589 -rw-r--r--   1 root     root      3664028 Dec  7 
05:00 
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Ficonv%2Futf-8/0.5.11%2C5.11-2023.0.0.21913%3A20231207T012507Z
   10.670.474   3589 -rw-r--r--   1 root     root      3664028 Dec  6 
05:00 
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Ficonv%2Futf-8/0.5.11%2C5.11-2023.0.0.21912%3A20231206T012503Z
   10.662.674   3589 -rw-r--r--   1 root     root      3664028 Dec  5 
05:00 
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Ficonv%2Futf-8/0.5.11%2C5.11-2023.0.0.21910%3A20231205T012514Z
   10.649.845   3589 -rw-r--r--   1 root     root      3664028 Dec  4 
05:00 
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Ficonv%2Futf-8/0.5.11%2C5.11-2023.0.0.21910%3A20231204T012625Z
   10.646.359   3589 -rw-r--r--   1 root     root      3664028 Dec  3 
05:00 
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Ficonv%2Futf-8/0.5.11%2C5.11-2023.0.0.21909%3A20231203T012507Z
   10.643.618   3589 -rw-r--r--   1 root     root      3664028 Dec  2 
05:00 
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Ficonv%2Futf-8/0.5.11%2C5.11-2023.0.0.21909%3A20231202T012212Z
   10.625.818   3589 -rw-r--r--   1 root     root      3664028 Nov 28 
05:00 
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Ficonv%2Futf-8/0.5.11%2C5.11-2023.0.0.21899%3A20231128T011937Z
   10.620.248   3589 -rw-r--r--   1 root     root      3664028 Nov 27 
05:00 
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Ficonv%2Futf-8/0.5.11%2C5.11-2023.0.0.21899%3A20231127T011925Z
   10.601.970   3589 -rw-r--r--   1 root     root      3664028 Nov 26 
05:00 
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Ficonv%2Futf-8/0.5.11%2C5.11-2023.0.0.21899%3A20231126T012827Z
   10.591.979   3589 -rw-r--r--   1 root     root      3664028 Nov 24 
05:00 
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Ficonv%2Futf-8/0.5.11%2C5.11-2023.0.0.21898%3A20231124T012156Z
   10.568.126   3589 -rw-r--r--   1 root     root      3664028 Nov 21 
05:00 
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Ficonv%2Futf-8/0.5.11%2C5.11-2023.0.0.21894%3A20231121T012042Z
   10.560.154   3589 -rw-r--r--   1 root     root      3664028 Nov 20 
05:00 
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Ficonv%2Futf-8/0.5.11%2C5.11-2023.0.0.21886%3A20231120T012057Z
   10.558.420   3589 -rw-r--r--   1 root     root      3664028 Nov 19 
05:00 
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Ficonv%2Futf-8/0.5.11%2C5.11-2023.0.0.21886%3A20231119T012241Z
   10.538.194   3589 -rw-r--r--   1 root     root      3664028 Nov 18 
05:00 
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Ficonv%2Futf-8/0.5.11%2C5.11-2023.0.0.21884%3A20231118T011910Z
   10.513.228   3589 -rw-r--r--   1 root     root      3664028 Nov 17 
05:00 
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Ficonv%2Futf-8/0.5.11%2C5.11-2023.0.0.21882%3A20231117T011904Z
   10.176.256   3589 -rw-r--r--   1 root     root      3664028 Nov  7 
05:00 
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Ficonv%2Futf-8/0.5.11%2C5.11-2023.0.0.21862%3A20231107T011847Z
   10.170.468   3589 -rw-r--r--   1 root     root      3664028 Nov  6 
05:00 
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Ficonv%2Futf-8/0.5.11%2C5.11-2023.0.0.21861%3A20231106T011430Z
   10.167.840   3589 -rw-r--r--   1 root     root      3664028 Nov  5 
05:00 
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Ficonv%2Futf-8/0.5.11%2C5.11-2023.0.0.21861%3A20231105T011642Z
   10.163.969   3589 -rw-r--r--   1 root     root      3664028 Nov  4 
05:00 
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Ficonv%2Futf-8/0.5.11%2C5.11-2023.0.0.21861%3A20231104T011602Z
   10.159.076   3589 -rw-r--r--   1 root     root      3664028 Nov  3 
05:00 
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Ficonv%2Futf-8/0.5.11%2C5.11-2023.0.0.21853%

Regards.

> _______________________________________________
> openindiana-discuss mailing list
> openindiana-discuss at openindiana.org
> https://openindiana.org/mailman/listinfo/openindiana-discuss

-- 
Predrag Zečević



More information about the openindiana-discuss mailing list