coreos / rpm-ostree

⚛📦 Hybrid image/package system with atomic upgrades and package layering
https://coreos.github.io/rpm-ostree
Other
841 stars 192 forks source link

Not being able to remove a pre-installed package #5002

Closed thepragmaticmero closed 2 weeks ago

thepragmaticmero commented 2 weeks ago

Describe the bug

I'm suppose that this isn't the place for this kind of bug reporting.

Its not a bug per se.

I'm not able to remove the preinstalled "nano" and "nano-default-editor" packages. I'm kind of a vim (vi-minimal) person, and I'm making a simple bash script for "debloating" my Fedora Silverblue install. I just want to delete pesky apps that I don't need. I'm having a hard time trying to use the OCI feature of silverblue or fedora immutable, so i'm making a bash script to solve my problem.

rpm-ostree outputs this error when I run rpm-ostree override remove nano

Checking out tree fa68d62... done
Resolving dependencies... done
error: Could not depsolve transaction; 1 problem detected:
 Problem: package nano-default-editor-7.2-7.fc40.noarch from @System requires nano = 7.2-7.fc40, but none of the providers can be installed
  - conflicting requests

Help please. Thanks

Reproduction steps

Run rpm-ostree override remove nano inside of a terminal

Expected behavior

Remove nano and nano-default-editor without being handholded by rpm-ostree

Actual behavior

Getting this error

Checking out tree fa68d62... done
Resolving dependencies... done
error: Could not depsolve transaction; 1 problem detected:
 Problem: package nano-default-editor-7.2-7.fc40.noarch from @System requires nano = 7.2-7.fc40, but none of the providers can be installed
  - conflicting requests

System details

$ rpm-ostree --version
rpm-ostree:
 Version: '2024.6'
 Git: 1dda51b264eec8003eb6032f1f41844754ec163b
 Features:
  - rust
  - compose
  - container
  - fedora-integration

Additional information

There's not a lot of info on google either so...... welp

You can also just simply remove a base package with rpm-ostree override remove . It will still be present in the underlying OSTree repository in /ostree/repo, but it will not be visible in the generated derived commit.

Similar to the override replace case, using rpm-ostree override reset will undo the change

even after running rpm-ostree override remove won't delete the specified files?

jmarrero commented 2 weeks ago

I seems like there is a package that is called system-default-editor which needs to be present and is provided by either nano-default-editor or vim-default-editor.

You can run:

 rpm-ostree override remove nano nano-default-editor --install vim-default-editor

and it should be successful.

thepragmaticmero commented 2 weeks ago

thnks for ur patience with a newb on immutable distros, it worked :D

jmarrero commented 2 weeks ago

glad to help :) welcome to the fun side. :rocket: