Removing firefox flatpak in custom bazzite spin

I have a bootc image forked from the image template, with the Containerfile inheriting FROM ``ghcr.io/ublue-os/bazzite-dx-nvidia:latest``.I’d like to use firefox as an RPM instead of a flatpak due to several personal preferences.

I currently have the line flatpak uninstall --delete-data org.mozilla.firefox -y in my build.sh, followed by a dnf5 install -y firefox later in the file, but I’m receiving an error indicating firefox is not yet installed during the build step:

+ flatpak uninstall --delete-data org.mozilla.firefox -y
error: No installed refs found for ?org.mozilla.firefox?
Error: building at STEP "RUN --mount=type=bind,from=ctx,source=/,target=/ctx --mount=type=cache,dst=/var/cache --mount=type=cache,dst=/var/log --mount=type=tmpfs,dst=/tmp /ctx/build.sh &&     ostree container commit": while running runtime: exit status 1
Error: Error: buildah exited with code 1
Trying to pull ghcr.io/ublue-os/bazzite-dx-nvidia:latest...

This results in the aborting of the build.

Any tips on how to avoid this? Is there a much better way to handle this without the janky uninstall-reinstall workflow?
Thanks for your time.

Flatpaks are not on the base image iirc, so they cannot be “uninstalled”. If your plan is to rebase from bazzite, all you need to do is uninstall the firefox flatpak from your desktop and you’re good to go (this has worked for me - I uninstalled firefox flatpak and my base image does not pull it in again even though I didn’t do anything).

To my knowledge the standard base of flatpaks are installed from a file specifying them on the ISO only.

1 Like