Hi, I have Tp-link Archer C2 v3 and want to migrate from 21.02 version to 22.03 version. But now (21.02.3 version) I have only 393 KB of free space (it is basically default Openwrt version + dnsmasq-full and https-dns-proxy postinstalled packages). But 22.03 version is much bigger. How can I be sure, that it will fit my device? Can I just customize installed packages in firmware selector and is it safe, if it fits 8 mb (preconfigured 22.03 image size is 6.50 mb)?
If an image gets built, it is supposed to fit (or it won't be built) - however the closer you get to the limits, chances increase that it might not fit well enough to create the persistent overlay (--> losing the configuration after each reboot). While the sysupgrade image size can provide you some rough guidance, you will have to try it - or keep a big enough margin from the beginning.
Very personally, I would get nervous with less than 1 MB free space, with 393 KB on 21.02.x I'm quite doubtful that 22.03.x is going to fit - so you might want to reconsider your optional packages a little.
 there is some residual risk that the exact size limits aren't reflected properly in the image recipes (legacy targets or simply the original submitting not having stated them correctly), but in general these are supposed to be correct and result in a 'safe' image.
If the device has an USB port, you can expand space.
for that, you still need to be able to flash the image, unless you use image builder to shrink it down.
what i mean, is install firmware only. If it has compilation, it fits, but there may not be space left for the packages that are wanted. So FIRST install the USB that needs to fit in the device's flash memory, and then install as many packages as you want.
I've been doing this with low-flash routers for a while.