开发者

Linux: Remove application settings after program is uninstalled?

开发者 https://www.devze.com 2023-02-01 22:00 出处:网络
I\'m writing a program for Linux that stores its data and settings in the home d开发者_StackOverflow社区irectory (e.g. /home/username/.program-name/stuff.xml). The data can take up 100 MB and more.

I'm writing a program for Linux that stores its data and settings in the home d开发者_StackOverflow社区irectory (e.g. /home/username/.program-name/stuff.xml). The data can take up 100 MB and more.

I've always wondered what should happen with the data and the settings when the system admin removes the program. Should I then delete these files from every (!) home directory, or should I just leave them alone? Leaving hundreds of MB in the home directories seems quite wasteful...


I don't think you should remove user data, since the program could be installed again in future, or since the user could choose to move his data on another machine, where the program is installed.

Anyway this kind of stuff is usually handled by some removal script (it can be make uninstall, more often it's an unsinstallation script ran by your package manager). Different distributors have got different policies. Some package managers have got an option to specify whether to remove logs, configuration stuff (from /etc) and so on. None touches files in user homes, as far as I know.


What happens if the home directories are shared between multiple workstations (ie. NFS mounted)? If you remove the program from one of those workstations and then go blasting the files out of every home directory, you'll probably really annoy the people who are still using the program on other workstations.

0

精彩评论

暂无评论...
验证码 换一张
取 消