-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Labels
Description
I noticed after building a potluck flavour (in this example mariadb), that it keeps packages in /var/cache/pkg after installation. It also keeps /var/db/freebsd-update, in case the pot fbsd-update flavour was run.
This means images are bigger than required.
Example from mariadb on 14.1-RELEASE:
# zfs list zroot/pot/jails/mariadb/m
NAME USED AVAIL REFER MOUNTPOINT
zroot/pot/jails/mariadb/m 619M 5.54G 1.49G /opt/pot/jails/mariadb/m
# rm -rf /opt/pot/jails/mariadb/m/var/cache/pkg/*
# zfs list zroot/pot/jails/mariadb/m
NAME USED AVAIL REFER MOUNTPOINT
zroot/pot/jails/mariadb/m 476M 5.68G 1.34G /opt/pot/jails/mariadb/m
freebsd-update is a bit more complicated, as in my example I inherited it from freebsd-potluck:
# rm -rf /opt/pot/jails/mariadb/m/var/db/freebsd-update
# zfs list zroot/pot/jails/mariadb/m
NAME USED AVAIL REFER MOUNTPOINT
zroot/pot/jails/mariadb/m 476M 5.68G 1.01G /opt/pot/jails/mariadb/m
As you can see, even though the usage won't go down, REFER went down by over 300MB (so the freebsd base image would shrink by that amount).