[OpenIndiana-discuss] Is it safe to remove /var/pkg/cache directory?
Predrag Zečević
predrag.zecevic.1961 at googlemail.com
Fri Dec 15 10:40:21 UTC 2023
> 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
Yes, this is me (somehow):
I was executing "pfexec pkg update -vn" every morning to get latest
packages available (output was send to file, parsed for interesting
packages, and sent to me per e-mail).
Seems that command downloads packages?
To prove, I did test:
:; cd /var/pkg/publisher/openindiana.org/pkg
:; find . -type f | sort > /tmp/pkg-1.txt
:; pfexec pkg update -vn # executed at 2023-12-15 10:32:47 CET
:; find . -type f | sort > /tmp/pkg-2.txt
:; diff /tmp/pkg-2.txt /tmp/pkg-1.txt | wc -l
770
So, I got 770 new entries under /var/pkg/publisher/openindiana.org/pkg !!!
Example:
:; ls -hld ./system%2Fsecurity%2Fkerberos-5/* | wc -l
891
:; ls -hld ./system%2Fsecurity%2Fkerberos-5/* | tail -5
-rw-r--r-- 1 root root 46K Dec 11 05:00
./system%2Fsecurity%2Fkerberos-5/0.5.11%2C5.11-2023.0.0.21923%3A20231211T012803Z
-rw-r--r-- 1 root root 46K Dec 12 05:00
./system%2Fsecurity%2Fkerberos-5/0.5.11%2C5.11-2023.0.0.21925%3A20231212T013240Z
-rw-r--r-- 1 root root 46K Dec 13 19:35
./system%2Fsecurity%2Fkerberos-5/0.5.11%2C5.11-2023.0.0.21925%3A20231213T011458Z
-rw-r--r-- 1 root root 46K Dec 14 05:00
./system%2Fsecurity%2Fkerberos-5/0.5.11%2C5.11-2023.0.0.21926%3A20231214T011328Z
-rw-r--r-- 1 root root 46K Dec 15 10:33
./system%2Fsecurity%2Fkerberos-5/0.5.11%2C5.11-2023.0.0.21928%3A20231215T071813Z
:; du -sh ./system%2Fsecurity%2Fkerberos-5/
41M ./system%2Fsecurity%2Fkerberos-5/
And so on...
Am I right when assuming that 'pkg update -vn' should NOT _download_
packages?
From 'man pkg':
---<snip>-------
-n
Perform a trial run of the operation with no package
changes made.
---<snip>-------
If answer is yes, then I will open ticket...
Also I assume that I am allowed to remove any package manifest file
under /var/pkg/publisher/openindiana.org/pkg what is not installed?
Regards.
P.S: IMHO, seems *pkg* keeps installed package "registry" in this
structure, under /var/pkg/publisher/openindiana.org:
:; ls -hl catalog/
total 2,0K
lrwxrwxrwx 1 root root 65 Dec 15 10:33 catalog.attrs ->
../origins/12dad71d06df371e72f75c488f47c75a13e340d1/catalog.attrs
lrwxrwxrwx 1 root root 66 Dec 15 10:33 catalog.base.C ->
../origins/12dad71d06df371e72f75c488f47c75a13e340d1/catalog.base.C
lrwxrwxrwx 1 root root 72 Dec 15 10:33 catalog.dependency.C ->
../origins/12dad71d06df371e72f75c488f47c75a13e340d1/catalog.dependency.C
lrwxrwxrwx 1 root root 69 Dec 15 10:33 catalog.summary.C ->
../origins/12dad71d06df371e72f75c488f47c75a13e340d1/catalog.summary.C
:; ls -hl origins/12dad71d06df371e72f75c488f47c75a13e340d1/
total 346M
-rw-r--r-- 1 root root 40K Dec 15 09:16 catalog.attrs
-rw-r--r-- 1 root root 7,5M Dec 15 08:29 catalog.base.C
-rw-r--r-- 1 root root 310M Dec 15 08:29 catalog.dependency.C
-rw-r--r-- 1 root root 29M Dec 15 08:29 catalog.summary.C
>
>
>>
>>> _______________________________________________
>>> 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