this post was submitted on 29 Aug 2024
50 points (98.1% liked)

Linux

48039 readers
758 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

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?

top 20 comments
sorted by: hot top controversial new old
[–] [email protected] 27 points 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).

[–] [email protected] 8 points 2 months ago (1 children)

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.

[–] [email protected] 7 points 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).

[–] [email protected] 6 points 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.

[–] [email protected] 2 points 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.