LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-26-2004, 10:12 AM   #1
Pinchiukas
LQ Newbie
 
Registered: Jun 2004
Location: Lithuania
Distribution: Slackware -current
Posts: 11

Rep: Reputation: 0
find files that do not belong to any package?


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
 
Old 08-26-2004, 10:55 AM   #2
marlor
Member
 
Registered: May 2004
Distribution: Slackware C
Posts: 274

Rep: Reputation: 30
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.

Last edited by marlor; 08-26-2004 at 10:58 AM.
 
Old 08-26-2004, 05:12 PM   #3
Pinchiukas
LQ Newbie
 
Registered: Jun 2004
Location: Lithuania
Distribution: Slackware -current
Posts: 11

Original Poster
Rep: Reputation: 0
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
 
Old 08-27-2004, 02:59 AM   #4
marlor
Member
 
Registered: May 2004
Distribution: Slackware C
Posts: 274

Rep: Reputation: 30
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.
 
Old 08-27-2004, 03:07 AM   #5
insyte
Member
 
Registered: Jul 2004
Distribution: Slackware Current
Posts: 308

Rep: Reputation: 30
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.
 
Old 08-27-2004, 07:49 AM   #6
marlor
Member
 
Registered: May 2004
Distribution: Slackware C
Posts: 274

Rep: Reputation: 30
it's really not that much trouble to browse through your files once a month and get rid of the junk. take it easy, have some coffee and start deleting
 
Old 08-27-2004, 10:45 AM   #7
Pinchiukas
LQ Newbie
 
Registered: Jun 2004
Location: Lithuania
Distribution: Slackware -current
Posts: 11

Original Poster
Rep: Reputation: 0
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
 
Old 09-13-2004, 10:59 AM   #8
Pinchiukas
LQ Newbie
 
Registered: Jun 2004
Location: Lithuania
Distribution: Slackware -current
Posts: 11

Original Poster
Rep: Reputation: 0
noone is at least going to try to write a script like that?
 
Old 09-14-2004, 01:38 AM   #9
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
http://www.linuxquestions.org/questi...hreadid=214913
 
Old 09-14-2004, 04:13 AM   #10
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
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/
 
Old 09-15-2004, 07:26 AM   #11
Pinchiukas
LQ Newbie
 
Registered: Jun 2004
Location: Lithuania
Distribution: Slackware -current
Posts: 11

Original Poster
Rep: Reputation: 0
i do use checkinstall, it's just that when i try some program and if i don't like it, it often leaves files for example in /etc after uninstalling
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Any aptitude command to find out what packages belong to a virtual package? Akhran Debian 9 11-05-2005 09:40 PM
what package does a program belong to? eantoranz Ubuntu 4 08-11-2005 03:28 PM
how can I find the file belong to what pkg? jiawj Slackware 9 03-07-2005 08:16 PM
Which package do these files belong to? dubya Linux - Software 6 12-28-2004 06:40 PM
how to find all files and programs in a package (RPM) 1kyle Linux - Software 1 07-13-2004 04:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration