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

Predrag Zecevic predrag.zecevic.1961 at googlemail.com
Wed Dec 13 13:13:55 UTC 2023


On 2023-12-13 13:35:03, Toomas Soome wrote:
>
>
>> On 13. Dec 2023, at 14:30, Predrag Zecevic via openindiana-discuss 
>> <openindiana-discuss at openindiana.org> wrote:
>>
>> Hi all,
>>
>> I have searched for solution first, and could not find it...
>>
>> My /var/pkg is huge:
>>
>> :; pfexec du -shc /var/pkg/*
>> 13G     /var/pkg/cache
>> 512     /var/pkg/gui_cache
>> 5,0K    /var/pkg/history
>> 61M     /var/pkg/license
>> 512     /var/pkg/linked
>> 512     /var/pkg/lock
>> 512     /var/pkg/modified
>> 5,5K    /var/pkg/pkg5.image
>> 14G     /var/pkg/publisher
>> 512     /var/pkg/ssl
>> 346M    /var/pkg/state
>> 28G     total
>>
>> I wonder if /var/pkg/cache can be "emptied"?
>>
>> With best regards.
>>
>> -- 
>> Predrag Zečević
>> predrag.zecevic.1961 at googlemail.com
>>
>>
>> _______________________________________________
>> openindiana-discuss mailing list
>> openindiana-discuss at openindiana.org
>> https://openindiana.org/mailman/listinfo/openindiana-discuss
>
>
> make sure flush-content-cache-on-successis True in pkg property 
> output, then install one package (and uninstall it if not really 
> needed;), then the cache should get flushed for you.
>
> rgds,
> toomas

Hi Toomas,

I have that property set since long time ago:

:; pkg property flush-content-cache-on-success
PROPERTY                       VALUE
flush-content-cache-on-success True

ATM:
:; du -sh /var/pkg/cache/
13G     /var/pkg/cache/

:; pkg list mail/opendkim

pkg list: no packages matching the following patterns are installed:
   mail/opendkim

:; pfexec pkg install mail/opendkim
            Packages to install:  2
             Services to change:  2
        Create boot environment: No
Create backup boot environment: No

DOWNLOAD                                PKGS         FILES    XFER 
(MB)   SPEED
Completed                                2/2       221/221 1.1/1.1 52.1k/s

PHASE                                          ITEMS
Installing new actions                       297/297
Updating package state database                 Done
Updating package cache                           0/0
Updating image state                            Done
Creating fast lookup database                   Done
Reading search index                            Done
Updating search index                            2/2
Updating package cache                           2/2

:; pfexec pkg uninstall mail/opendkim
             Packages to remove:  1
             Services to change:  2
        Create boot environment: No
Create backup boot environment: No

PHASE                                          ITEMS
Removing old actions                         249/249
Updating package state database                 Done
Updating package cache                           1/1
Updating image state                            Done
Creating fast lookup database                   Done
Reading search index                            Done
Updating search index                            1/1
Updating package cache                           2/2

# Installed 2 packages, but removed only one -- but that is another story...

:; du -sh /var/pkg/cache/
13G     /var/pkg/cache/

So, nothing has happen

Regards.

-- 
Predrag Zečević
predrag.zecevic.1961 at googlemail.com




More information about the openindiana-discuss mailing list