[OpenIndiana-discuss] Is it safe to remove /var/pkg/cache directory?
Predrag Zečević
predrag.zecevic.1961 at googlemail.com
Thu Dec 14 15:45:51 UTC 2023
On 2023-12-14 16:26, Predrag Zečević wrote:
> 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.
I need to correct myself: 1st column is number of inodes, so this is
correct:
:; pfexec find /var/pkg/publisher/openindiana.org/pkg/ -type f -ls |
numfmt --field 7 --from=iec --format "%'12f" | sort -nr -k7,7 | head -25
65247 18830 -rw-r--r-- 1 root root 19.222.196 Dec
13 19:36
/var/pkg/publisher/openindiana.org/pkg/system%2Flibrary%2Fboost/1.78.0%2C5.11-2023.0.0.4%3A20231029T120638Z
64087 7559 -rw-r--r-- 1 root root 7.617.818 Dec
13 19:36
/var/pkg/publisher/openindiana.org/pkg/runtime%2Fruby-26/2.6.10%2C5.11-2023.0.0.1%3A20230219T204316Z
10035361 6919 -rw-r--r-- 1 root root 7.026.767 Oct
6 05:00
/var/pkg/publisher/openindiana.org/pkg/runtime%2Fruby-26/3.2.2%2C5.11-2023.0.0.0%3A20231005T205238Z
64491 6919 -rw-r--r-- 1 root root 7.026.767 Dec
13 19:36
/var/pkg/publisher/openindiana.org/pkg/runtime%2Fruby-32/3.2.2%2C5.11-2023.0.0.0%3A20231006T122317Z
64081 6407 -rw-r--r-- 1 root root 6.464.874 Dec
13 19:36
/var/pkg/publisher/openindiana.org/pkg/runtime%2Fruby-23/2.3.8%2C5.11-2023.0.0.3%3A20230219T183227Z
65883 6022 -rw-r--r-- 1 root root 6.062.353 Dec
13 19:36
/var/pkg/publisher/openindiana.org/pkg/system%2Fmanagement%2Fansible/8.6.1%2C5.11-2023.0.0.0%3A20231110T132433Z
11029074 5894 -rw-r--r-- 1 root root 5.943.763 Dec
13 19:34
/var/pkg/publisher/openindiana.org/pkg/library%2Fqt6/6.6.0%2C5.11-2023.0.0.0%3A20231129T071756Z
7903464 5383 -rw-r--r-- 1 root root 5.463.598 Sep
20 05:00
/var/pkg/publisher/openindiana.org/pkg/library%2Fqt6/6.3.2%2C5.11-2023.0.0.0%3A20230919T190700Z
5935079 5254 -rw-r--r-- 1 root root 5.303.667 Nov
1 2022
/var/pkg/publisher/openindiana.org/pkg/developer%2Fgolang-119/1.19.2%2C5.11-2022.0.0.0%3A20221031T095117Z
23516 5254 -rw-r--r-- 1 root root 5.263.448 Dec
13 19:35
/var/pkg/publisher/openindiana.org/pkg/developer%2Fgolang-121/1.21.5%2C5.11-2023.0.0.0%3A20231208T231223Z
10138026 5254 -rw-r--r-- 1 root root 5.260.031 Oct
29 05:00
/var/pkg/publisher/openindiana.org/pkg/developer%2Fgolang-121/1.21.3%2C5.11-2023.0.0.1%3A20231028T123723Z
10046990 5254 -rw-r--r-- 1 root root 5.260.027 Oct
8 05:00
/var/pkg/publisher/openindiana.org/pkg/developer%2Fgolang-121/1.21.2%2C5.11-2023.0.0.0%3A20231007T124506Z
6502728 4998 -rw-r--r-- 1 root root 5.004.143 Sep
7 05:00
/var/pkg/publisher/openindiana.org/pkg/developer%2Fgolang-120/1.20.7%2C5.11-2023.0.0.1%3A20230906T053132Z
9500436 4998 -rw-r--r-- 1 root root 5.004.078 Jul
18 05:00
/var/pkg/publisher/openindiana.org/pkg/developer%2Fgolang-120/1.20.6%2C5.11-2023.0.0.0%3A20230717T202025Z
3737552 4870 -rw-r--r-- 1 root root 4.855.495 Jan 8 2021
/var/pkg/publisher/openindiana.org/pkg/library%2Fqt5/5.12.10%2C5.11-2020.0.1.1%3A20210107T171537Z
63137 4613 -rw-r--r-- 1 root root 4.620.942 Dec 13 19:36
/var/pkg/publisher/openindiana.org/pkg/library%2Fqt5/5.15.4%2C5.11-2023.0.0.8%3A20231003T194528Z
7465857 4613 -rw-r--r-- 1 root root 4.620.917 Jan 30 2023
/var/pkg/publisher/openindiana.org/pkg/library%2Fqt5/5.15.4%2C5.11-2023.0.0.4%3A20230129T232139Z
1777394 4613 -rw-r--r-- 1 root root 4.595.173 Aug
20 2021
/var/pkg/publisher/openindiana.org/pkg/developer%2Fgolang-116/1.17%2C5.11-2020.0.1.0%3A20210819T193555Z
1644941 4229 -rw-r--r-- 1 root root 4.213.884 Jul
20 2021
/var/pkg/publisher/openindiana.org/pkg/developer%2Fgolang-116/1.16.6%2C5.11-2020.0.1.0%3A20210719T123034Z
1644858 4101 -rw-r--r-- 1 root root 4.136.697 Jul
20 2021
/var/pkg/publisher/openindiana.org/pkg/developer%2Fgolang-115/1.15.14%2C5.11-2020.0.1.0%3A20210719T123033Z
3236343 4101 -rw-r--r-- 1 root root 4.124.715 Oct
4 2020
/var/pkg/publisher/openindiana.org/pkg/developer%2Fgolang-115/1.15.2%2C5.11-2020.0.1.0%3A20201003T202017Z
21611 4101 -rw-r--r-- 1 root root 4.095.080 Dec
13 19:35
/var/pkg/publisher/openindiana.org/pkg/desktop%2Foffice%2Flibreoffice/7.6.4%2C5.11-2023.0.0.0%3A20231209T130055Z
7901845 4101 -rw-r--r-- 1 root root 4.094.105 Sep
20 05:00
/var/pkg/publisher/openindiana.org/pkg/desktop%2Foffice%2Flibreoffice/7.6.1%2C5.11-2023.0.0.0%3A20230919T220735Z
7396156 3973 -rw-r--r-- 1 root root 3.987.021 Dec
19 2022
/var/pkg/publisher/openindiana.org/pkg/desktop%2Foffice%2Flibreoffice/7.2.7%2C5.11-2022.0.0.3%3A20221218T214316Z
10699514 3589 -rw-r--r-- 1 root root 3.664.028 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
Strange is this:
:; pkg list | grep golang
developer/golang 1.21.1-2023.0.0.0
i--
developer/golang-121 1.21.5-2023.0.0.0
i--
But:
:; ls -dlh /var/pkg/publisher/openindiana.org/pkg/developer%2Fgolang*
drwxr-xr-x 2 root root 9 Dec 13 19:36
/var/pkg/publisher/openindiana.org/pkg/developer%2Fgolang
drwxr-xr-x 2 root root 4 Aug 23 2021
/var/pkg/publisher/openindiana.org/pkg/developer%2Fgolang-115
drwxr-xr-x 2 root root 4 Aug 25 2021
/var/pkg/publisher/openindiana.org/pkg/developer%2Fgolang-116
drwxr-xr-x 2 root root 3 Jun 19 15:21
/var/pkg/publisher/openindiana.org/pkg/developer%2Fgolang-119
drwxr-xr-x 2 root root 4 Oct 4 11:24
/var/pkg/publisher/openindiana.org/pkg/developer%2Fgolang-120
drwxr-xr-x 2 root root 5 Dec 14 12:47
/var/pkg/publisher/openindiana.org/pkg/developer%2Fgolang-121
So, no directory was removed when package is removed! That explains 15
GB in /var/pkg/publisher/ directory.
If no one else have this problem, then it is not bug, but something else
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