I recently installed chromium, created a new user and logged into a website. After my work was done, I removed chromium with “sudo dnf remove chromium”.

A few days later I installed chromium again through dnf. My user account was still there and I was logged into the same site.

Is there a way to avoid this and uninstall an app along with all its user data?

  • IrritableOcelot@beehaw.org
    link
    fedilink
    arrow-up
    7
    ·
    2 months ago

    Check for a ~/.config/chromium folder and delete it. dnf doesn’t seem to have an equivalent to apt purge chromium which would be the other thing to do (while the package is installed).

  • mvirts@lemmy.world
    link
    fedilink
    arrow-up
    7
    arrow-down
    1
    ·
    2 months ago

    Sounds like you may want to run chrome in docker or try using nix. Nix won’t clean up your user data automatically but with a few tweaks could do it easily. Docker will completely prevent files from hanging around (if you don’t mount your home directory in the container), but if you want to download files to your host is its a bit tricky.

  • Leaflet@lemmy.world
    link
    fedilink
    English
    arrow-up
    27
    ·
    2 months ago

    Most package managers do not touch your home directory, so they will not delete user data. That needs to be done manually.

    Snap and flatpak are exceptions, with an optional argument they will also delete the app’s folder (~/snap/appName for snap, ~/.var/app/flatpakID for flatpak).

  • just_another_person@lemmy.world
    link
    fedilink
    arrow-up
    8
    ·
    2 months ago

    You can just delete the local profile directory. Depending on your setup, it could be anywhere. Just check in the browser’s config info to find out where it is and delete that directory after you uninstall.

    • maliciousonion@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      7
      arrow-down
      12
      ·
      2 months ago

      Thanks. I wish there was a more straightforward process though.

      Every other OS I’ve used purges all app data after uninstalling, why is Linux different?

      • Wispy2891@lemmy.world
        link
        fedilink
        arrow-up
        7
        ·
        2 months ago

        Chrome definitely leaves permanent traces on windows when you uninstall it

        And on MacOS there isn’t an uninstaller too, you just send the app to the trash, but all the preferences and leftovers keep littering the drive

      • kolorafa@lemmy.world
        link
        fedilink
        arrow-up
        6
        ·
        2 months ago

        One of the reason is that apps can place their files in any place they want so the app manager is not aware of those locations.

        Even if it would know then the user still would need a way to remove the app without deleting data, imagine installing Developer IDE or chat app and uninstall process would remove your chats or projects. Imagine app dev accidentally set the “directory that store app data” to /home, it would be bad.

        I not once uninstalled app to install different (for example older) version due to bugs in new one.

        Having the logic allowing to optionally delete data would introduce additional complexity so most old package managers never introduced that feature.

        But I agree that we should slowly introduce a way to to that. Some app managers that manage flatpaks now allow to delete user data after uninstalling app, this now could be done universally because apps installed using flatpak store their data in their own separated/dedicated directory that flatpak engine know about so (unless you give permissions to access other location) thw manager know where the app store data so can offer easy way to remove it.

      • TheGrandNagus@lemmy.world
        link
        fedilink
        English
        arrow-up
        50
        ·
        2 months ago

        If you install something as a Flatpak, you have that option.

        And Windows absolutely does not remove everything after an app is uninstalled.

        • maliciousonion@lemmy.mlOP
          link
          fedilink
          English
          arrow-up
          6
          arrow-down
          20
          ·
          2 months ago

          (In Windows) If you uninstall a program using the “uninstall.exe” provided, you can tick an option to wipe all the data.

          This is also available from the Control Panel’s “Uninstall programs” page. The “uninstall” button usually launches the “uninstall.exe” provided by the app’s devs.

          I’ve never had this issue on Windows before

          • just_another_person@lemmy.world
            link
            fedilink
            arrow-up
            28
            ·
            2 months ago

            That is at the discretion of the developer who packaged it up. Linux is designed to NOT do such things by default, and is therefore more resilient to “oopsie” moves.

            • maliciousonion@lemmy.mlOP
              link
              fedilink
              English
              arrow-up
              5
              arrow-down
              1
              ·
              2 months ago

              Yeah It’s more reliable in that way.

              Still, I wish there was a something like a simple flag for the package manager so I could control if user data gets preserved.

              I’m a bit surprised that that isn’t a feature.

              • just_another_person@lemmy.world
                link
                fedilink
                arrow-up
                4
                ·
                2 months ago

                Package management isn’t intentionally separated from running code operations for a reason. If you want to do something specific like this regularly though, just write a simple two like script that handles it for you: 1) uninstall 2) rm directories.

              • Album@lemmy.ca
                link
                fedilink
                arrow-up
                8
                ·
                2 months ago

                You’d be surprised maybe how many developers don’t properly remove all files they put on your computer. Adobe is notorious for this.

          • Khanzarate@lemmy.world
            link
            fedilink
            arrow-up
            7
            ·
            2 months ago

            Here’s an example. I removed avast via the uninstaller on a relatives computer, it made it laggy as hell. I restart after as the uninstaller demands, but it was still there.

            Searching, I find this official support option. https://support.avast.com/en-us/article/10

            The official Avast Uninstall Tool, the tool to use when the included uninstaller didn’t work.

            The official uninstall tool didn’t work either. I ran it in safe mode, like it said. Didn’t work, either, but it removed some stuff, and finally let me delete some things manually. Ran it again in safe mode after that, finally seems to have removed everything.

            Anyway it’s a great example of if a company doesn’t know what they’re about, windows has no process to recover from that. Window’s process is identical to a Walmart employee saying. “I dunno, man, contact the manufacturer.” Genuinely, its usually enough, but when its not, there’s absolutely no recourse.

            • saigot@lemmy.ca
              link
              fedilink
              arrow-up
              3
              ·
              2 months ago

              I know this isn’t the point but avast is more or less malware itself these days. The bundled windows defender + the free (not always running) version of malwarebytes is a good enough solution for almost everyone.

              • Khanzarate@lemmy.world
                link
                fedilink
                arrow-up
                3
                ·
                2 months ago

                Completely agree.

                The only reason the relative had it at all was because of those old fears. As soon as I learned that they had it bundled with the computer (hate that. Malware’s gotta get in somewhere though I guess), I knew why it was being slow.

                I hold this up as an example because even their own troubleshooting website and a program dedicated to the purpose above and beyond the usual uninstaller couldn’t do it though. Avast doesn’t even know its own malware.

                Also this nonsense got me the chance to put mint on their computer, but the “switch to Linux” argument isn’t constructive in this particular spot. They didn’t end up sticking to it because a required-for-school piece of software for tests just doesn’t do Linux at all. Couldn’t get it to run in wine or even a virtual machine either, and they’re not great at the whole computer thing so I didn’t wanna be tech support for dual booting.

          • kolorafa@lemmy.world
            link
            fedilink
            arrow-up
            3
            ·
            2 months ago

            In the last I had very little success rate of those uninstall tools to actually do their job in full. A lot of time they delete some data but almost always they leave some trash behind.

            And in the first place, I stopped trusting those external uninstall binaries, they could be designed to remove not only app data but remove your personal data, steal data from your PC or infect it (even if just to investigate why you are uninstalling).

          • TheGrandNagus@lemmy.world
            link
            fedilink
            English
            arrow-up
            15
            arrow-down
            1
            ·
            2 months ago

            Yeah, if the dev provided an uninstaller, if that uninstaller really does clean everywhere, and if control panel finds and executes that uninstaller – which in my experience it very often doesn’t.

            To me the Flatpak way is better. But yeah, maybe system packages not doing it can be annoying sometimes. I just take issue with you saying it’s not an issue on Windows when it absolutely is, and is IMO worse there.

      • qjkxbmwvz@startrek.website
        link
        fedilink
        arrow-up
        5
        ·
        edit-2
        2 months ago

        I think (?) it’s generally true that the root user should never mess with users’ files.

        Imagine your home directory is shared across many systems on a network (my alma mater did this). It would be really bad if a sysadmin for alpha.university.edu removed a program, and suddenly your personal settings were removed from beta.university.edu — even though that computer still has the program.

        This is one of the “UNIX on the desktop” issues — a lot is designed for a sysadmin/multiuser situation, and it has some gotchas when using it as a desktop machine (I’m used to/really appreciate the directory structure and settings management at this point, but it may take some getting used to).

  • mantra@lemmy.zip
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    2 months ago

    You could always write yourself a simple bash clean-up script that kicks off the uninstall and also deleted the profile and anything else you want gone. Not a universal solution, but if you need to do that one thing often enough it would do the trick.