Somewhere in $OH_USERDATA/cache. I think Marketplace addons get copied to $OH_USERDATA/marketplace but I don’t have installed at the moment and can’t confirm.f
Yes, the whole cache folder gets removed when clearing the cache. It gets repopulated when OH starts back up based on whatever was recorded in the $OH_USERDATA/config/org/openhab/addons.config and $OH_USERDATA/jsondb/org.openhab.marketplace.json (for the marketplace installed add-ons.
I don’t know if the bundle you installed using the karaf console gets recorded anywhere. I’d guess in that addons.config file if it is recorded anywhere. If it’s not recorded, you’ll have to install it again manually after clearing the cache.