SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
but i don't wanna clean everything like that after each upgrade too much fuss and by the way packages leave config files in /etc after they are uninstalled
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
./configure --prefix=/usr
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
Hi Pinchiukas,
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/
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.