I installed GNOME on my KDE fedora install some time ago not realizing it would litter my install with gnome apps. Wondering if there’s a safe and easy way to remove them. Everyone online seems to say that removing a DE risks uninstalling a lot of stuff and thought I should ask here to be sure.

Thanks in advance for any advice!

  • CaptDust@sh.itjust.works
    link
    fedilink
    arrow-up
    9
    arrow-down
    1
    ·
    edit-2
    21 days ago

    Uninstall the gnome desktop package, reinstall the kde desktop package and that should pull the overlapping dependencies. Might need to do this from a virtual terminal, not in the desktop environment.

    Or reinstall the OS.

    Edit: there’s also dnf swap command available for fedora, I’m not really familiar with it’s behavior or how it acts when both DE are already installed, but maybe that could be a lead.

    Edit 2: after doing reading, I’m confident you can just dnf remove @gnome-desktop. The .config files will not be impacted. Applications with overlapping KDE dependencies will belong to two groups, and the operation will keep the ones that include the KDE group. I still recommend a backup.

    • CorrOP
      link
      fedilink
      arrow-up
      6
      ·
      22 days ago

      This makes sense. Will this nuke any config files I have set up already?

      Thanks for the suggestions!

      • CaptDust@sh.itjust.works
        link
        fedilink
        arrow-up
        6
        ·
        21 days ago

        Hey op, after doing reading, I’m confident you can just dnf remove @gnome-desktop. The .config files will not be impacted. Applications with overlapping KDE dependencies will belong to two groups, and the operation will keep the ones that include the KDE group. I still recommend a backup.

        • CorrOP
          link
          fedilink
          arrow-up
          1
          ·
          21 days ago

          Thanks so much for the information! I really appreciate it. I’ll see about doing that when I get home tonight

      • leopold@lemmy.kde.social
        link
        fedilink
        English
        arrow-up
        3
        ·
        21 days ago

        No. all KDE config is in the home directory except maybe some SDDM stuff, which should be trivial to reconfigure if needed.

      • CaptDust@sh.itjust.works
        link
        fedilink
        arrow-up
        3
        ·
        edit-2
        22 days ago

        It shouldn’t but I’m hesitant to say it won’t. Back up all the things you don’t want to lose, this is not a risk free maneuver. However in my limited experience it was the opposite - it’ll remove the applications, but you will still have now-useless config files from the removed environment in place taking up space.

  • Dr. Wesker@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    12
    arrow-down
    5
    ·
    edit-2
    22 days ago

    Have you thought about biting the bullet and just doing a full wipe and fresh OS install? I recently did this with a fresh, minimal Debian install, and it was so worth it.

    • CorrOP
      link
      fedilink
      arrow-up
      13
      ·
      22 days ago

      I just installed 6 months ago and I don’t feel any need or desire to do a full reinstall if I can avoid it

      • Dr. Wesker@lemmy.sdf.org
        link
        fedilink
        English
        arrow-up
        6
        arrow-down
        4
        ·
        edit-2
        22 days ago

        It’s not. I’m constantly learning and making a mess. A fresh install every year or two keeps the house clean, and keeps me in good practice.

  • Ibaudia@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    21 days ago

    It’s way easier to just create an entirely new system without those packages rather than trying to surgically remove specific ones that already exist. Dependency hell is real and you will go there forever if you’re not careful.

  • Cyborganism@lemmy.ca
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    22 days ago

    Try to find the Fedora/yum equivalent to

    apt-get purge gnome-desktop

    apt-get autoremove

    • winterayars@sh.itjust.works
      link
      fedilink
      arrow-up
      2
      ·
      18 days ago

      dnf remove @gnome-desktop dnf autoremove

      For the curious.

      Note that the autoremove might not do anything here. Removing @gnome-desktop removes the whole package group and should get everything in it.

  • land@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    21 days ago

    A question related to this: is there a way to remove pre-installed apps on gnome? I have tried to uninstall them, but the system won’t let me.

  • Successful_Try543@feddit.de
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    21 days ago

    I suppose Fedora works similar to Debian handling dependencies, thus uninstalling libgtk* should trigger removing all GNOME/GTK packages and apps. Removing a metapackage, like it’s probably gnome-desktop, usually does almost nothing.

    Edit: You can reinstall the GTK apps you like to use, e.g. Firefox or LibreOffice, later, as the user config files are not going to be deleted.

    Edit 2: Maybe I’ve misunderstood: Do you want to keep the GNOME login session an desktop environment but use KDE apps like Kate instead of gedit?

    • CorrOP
      link
      fedilink
      arrow-up
      3
      ·
      21 days ago

      I want everything GNOME gone. Decided KDE was more my style

      • Successful_Try543@feddit.de
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        21 days ago

        Then, as I said, removing libgtk2 and libgtk3, specifically, the corresponding packages containing these libraries, should trigger removing everything GNOME/GTK related.

  • winterayars@sh.itjust.works
    link
    fedilink
    arrow-up
    1
    ·
    18 days ago

    I think you already got a good answer but let me throw in another:

    Fedora’s dnf provides some good history and update reversion tools. You can use:

    dnf history list

    to get a list of all actions taken on the system since install. Use “dnf history info 5” to get info on the 5th transaction. (Get the transaction ID numbers from “dnf history list”.)

    Then to revert a change use either:

    dnf history rollback or dnf history undo

    Using undo reverses a single transaction, so if you have one where you did something like “dnf install tmux” and then ran undo on it then that would be equivalent to running “dnf remove tmux” in terms of what it does on your system.

    Rollback does what you might think: it basically goes through all the updates between the most recent and the one specified and it reverses each of them, theoretically restoring the system to the state it was in at that time.

    I say “theoretically” because this isn’t a perfect system. For example, if you have an update where you removed some software that had some customizations done to it and then went through a rollback it’ll put that software back but may be missing configurations you applied to it, so potentially it could cause some issues if those were important. This gets into a lot of complicated stuff and tbh it is a powerful but imperfect system. Something like Atomic gives you more of a guarantee that a rollback will work because the whole system state is defined by the installer, not just the packages.

    There’s one more note: Fedora removes old versions of packages from its repos so you’ll need to add their historical archives repo to do certain things. I forget how to do that off the top of my head.

    This may not be what you want exactly but it’s a powerful tool that’s good to be aware of.

    See this for more info.