Rpm-ostree remove a single or multiple packages? + some more combined actions syntax questions

Hi, quick question.

I want to remove a single package. Currently I do it so, that I do

rpm-ostree status

write down all overlays and removals, and remove the package through

rpm-ostree reset && rpm-ostree override remove a b c --install d --install f
  1. Does the last syntax work? Its kinda hard to combine an overwrite and an uninstall in a single command, really important for efficiency though. - Yes that syntax works

  2. Is there a better way? This is horrible, especially with locally sourced RPMs

Edit: found the solutions:

# remove layered package
rpm-ostree uninstall PACKAGE1 PACKAGE2

# remove package from image
rpm-ostree override remove PACKAGE1 PACKAGE2

# replace package
rpm-ostree override replace RPM-FILE || rpm-ostree override remove PACKAGE --install PACKAGE2

#install a Package and remove a layered package and  in same command
rpm-ostree install PACKAGE1 PACKAGE2 --remove PACKAGE3 # does this work?

# remove layered packages and install multiple ones
rpm-ostree uninstall PACKAGE1 PACKAGE2 --install PACKAGE3 --install PACKAGE4

# remove a system package and install multiple ones
rpm-pstree override remove PACKAGE1 PACKAGE2 --install PACKAGE3 --install PACKAGE4

now the question is, how do I update, remove and install at the same time? Afaik you can only add one single option to rpm-ostree update like

rpm-ostree update --install A

rpm-ostree update --remove B

also, it seems

rpm-ostree update --override remove A

is not possible.

If you’re replacing a pre-installed package with something else, you can just do override replace <rpm-file>

If you’re actually just removing with no replacement, the extra install flags aren’t needed

1 Like

I found out that

rpm-ostree remove <PACKAGENAME>

is the right command to remove a layered package.

This is also a useful command. Do you know if I can replace multiple packages with something else?

There is a big issue with ffmpeg, when replacing the free codecs with it, from rpmfusion.

See my post here, the complete manual replacement method.

Btw, this failed:

/v/h/user ❯❯❯ rpm-ostree override replace ffmpegthumbnailer                                                                                                                         master ◼
error: Non-local replacement overrides not implemented yet

the local package is called ffmpegthumgs, trying

rpm-ostree override remove ffmpegthumbs --install ffmpegthumbnailer

and in fact its downloading the rpmfusion version

For the record, that’s a hidden compatibility alias. The documented command is rpm-ostree uninstall. I think using different terminology helps emphasize the distinction between uninstall and override remove.

1 Like

thanks, I will edit that.