hello. I have been looking at anytime that I delete and app, if I install it again it comes with all the data that was there before deleting it.
Anyone knows or understand this behave??
how can I delete completely an app?
it has happen recently when desinstalling puremaps and install it again, the API for maps is still the same .
pkcon/zypper remove packagename
does not remove the configuration files that come with the installation (if not explicitly coded in rm scripts).
And with RPM there is no method like
apt-get purge xxx
which not only deinstalled but also cleaned up config files.
iirc on TJC I had some exchange regarding this topic where as output came up a script to do so…
This is missing feature in RPM packaging, in my eyes.
Nor will files created on first start of app be removed.
So if you really want to clear up you would need to hunt down.
In user home .config
probably /usr/share/package
or /var/lib/package
or even /etc/package
As peterleinchen said: Individual app data needs to be removed manually . The RPM packaging system does not seem to cover these.
Check out Mashka. It gives you a convenient overview of app data from installed and formerly installed app. You can delete cache and config data. Note that apps need to follow the commonly used UNIX config path scheme in order to show up there
This is a Linux/UNIX feature. The package manager cannot know which .conf files are generated by an app. Usually they are only generated when the app is started for the first time. The developer must ensure that all created files are deleted during the deinstallation.
Am i getting this wrong?
apt-get purge
Does not delete app-specific data/configuration in user-directories as well. So IMHO RPM is not to blame here, it’s just that deb/RPM concepts don’t work well for “Apps”.
Tell the developer of the app. He/she has to specify it in the RPM’s spec file.
You’re correct, Apps need to manually define the files to remove when the package manage uninstalls, but not many devs know about that or know how to actually do it; I’m not even sure myself how to do it
Yes, as I said above
This counts for any package mechanism afaik (maybe should have stated more explicit?).
apt’s purge will only delete known/specified conf files.
I must correct myself. Not only Unixoid systems have this problem
This is a good resource: https://docs.fedoraproject.org/ro/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch09s05s03.html
Maybe there should be and option whether you want to delete or keep the user data?
Or simple information where these data are, so the user can delete them manually as devel-su if wanted.
RPM %preun
or %postun
scripts can (and IMO should) be used for that. Just don’t forget the if [ "$1" == 0 ]
check ($1
is 1
on upgrade). That’s forbidden in Jolla Store though
This is an important thing we devs have to start think about.
IMO a system package manager like rpm should not touch any data inside the user directory. This also became more difficult with multi user support.
I would prefer a “clear config” button inside the app itself, which also gives you feedback what is about to be deleted.
It’s not RPM, it’s your script who does the cleaning. RPM itself doesn’t touch anything that’s not related to package management. With multiple users it’s pretty much the only place where it can be done, actually. Apps have no access to other user’s data, but scripts which are run by RPM with root privileges, do.
But how can the user decide whether or not to delete data?
Good point There’s no simple solution, it seems.
Maybe this helps? :
Uninstall packages with configuration files
Debian : dpkg --purge PaketName
Debian : apt-get purge PaketName
Debian : aptitude purge PaketName
Red Hat/CentOS : yum remove
Gentoo : ?
Zypper : zypper remove [12)]
[12)]
Complete cleaning of the configuration only manually:
for package in package1 package2 package3
do
echo "removing config files for $package"
for file in $(rpm -q --configfiles $package)
do
echo " removing $file"
rm -f $file
done
rpm -e $package
done
Edit: This is a generic suggestion.
You mean like?
https://together.jolla.com/question/229207/zypper-remove-packages-including-configs-apt-purge/
Oh, surprise! Seems like an old problem.