SlackwareThis Forum is for the discussion of Slackware Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
is there a tool for listing files that don't belong to any package? cause after upgrading something old packages often leave files/dirs that will never be used and trash the system. so i would like to remove them as you could tell maybe a simple script could be written for this? if so somebody please do this
thanks in advance for all help
well there is no way really do to it after installing the new package over the old one. best thing you should do is to remove the old package first and then get the new one.
or depending on the package it might write the version number after the dir it created.
let's say a program called bla.
the old one's dir is called bla1-0
and the new one's dir is bla2-0
after you make sure that bla2 works. it should be save to delete bla1-0
one example is with gaim. i forgot the remove the old package first. so i just went to the directory where i installed it and saw 2 gaim dir's with different version numbers after it. i delete the old on.
well there is no really way to do it. best thing you can do is to uninstall. and if it is a program that you will install again it will most probably use the same config file in /etc anyway.
if it is a program that you will not install again, just keep note of those programs you uninstalled. and one day that you have some free time you can use the slocate to find the leftovers of those programs you uninstalled and get rid of them.
the reason it is not very possible to have a script for this is because the program might be called different to the config file or other related files. so even if you try to write a script for it, it will not work for all programs, and it might also be that the script ends up deleting a wrong file.
Well, I also wish there was a way to do this automatically. One thing you can do is to organize your installs. Aside from using checkinstall, make everything you add install to one directory, say /usr by
For other files, programs usually leave settings in your /home directory so they're easy to find. For scripts, explore your /etc once in a while.
The only way of really deleting everything is by making a fresh install.
well a simple script could search for each file in /var/log/packages/* and if it wasn't found, put it in a logfile... this would be nice and i think shouldn't be too hard to write... unfortunately i'm not a programmer of any kind
btw i think slapt-get or swaret could have a feature like this
99% of the Slackware files (when just installed) will belong to a package. And the 1% should not be removed :P
If you are trying to remove some software you compiled yourself i'd suggest you to use checkinstall which is called instead of make install to generate a package of the program you want to install.
It's very simple to use and works 99% of the time, try it at: http://checkinstall.izto.org/