Easy way to free up space space on UniFi AC Mesh

The free space of the Unifi AC Mesh is limited due to the dual boot option of the Unifiy AC; there are 2 MTD partitions for kernels; kernel and kernel1. In the Openwrt manual (https://openwrt.org/toh/ubiquiti/unifiac), there is a remark that after erasing the kernel1 partition (mtd erase kernel1) a fresh install of the sysupgrade can free up additional space. Does anybody know how this works?

On Github I found this discription: https://gist.github.com/1lann/542a4c3a81a8b414fea2d8179abd8248. Before I proceed I really want to know if there isn't an easier solution that is supported by Openwrt.

This is the default after commit e4a76673ff4f ("ath79: combine UniFi AC dual firmware-partitions"), which will be part of the upcoming 23.05 release.

FWIW, it's working perfectly on my UAP AC Pros.

root@unifiac:~# df -hT
Filesystem           Type            Size      Used Available Use% Mounted on
/dev/root            squashfs        6.3M      6.3M         0 100% /rom
tmpfs                tmpfs          59.4M    104.0K     59.3M   0% /tmp
/dev/mtdblock5       jffs2           6.6M    364.0K      6.3M   5% /overlay
overlayfs:/overlay   overlay         6.6M    364.0K      6.3M   5% /
tmpfs                tmpfs         512.0K         0    512.0K   0% /dev
root@unifiac:~# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00060000 00010000 "u-boot"
mtd1: 00010000 00010000 "u-boot-env"
mtd2: 00f20000 00010000 "firmware"
mtd3: 00260000 00010000 "kernel"
mtd4: 00cc0000 00010000 "rootfs"
mtd5: 006a0000 00010000 "rootfs_data"
mtd6: 00020000 00010000 "bs"
mtd7: 00040000 00010000 "cfg"
mtd8: 00010000 00010000 "art"