Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
I have been wondering, when you install software from source code, what is the best way to get rid of all the files from the older version of that software?
For instance, I just installed IPTables 1.2.5 from source, but before that I had 1.2.2.
It seems to me that the system could get very cluttered with old files if you do not clean the unneeded ones somehow.
If you are just upgrading to a newer version then you shouldn't really have a problem. Most of the time the older version will just get overwritten with the newer version.
If you really want to make sure each file which isn't needed anymore will definetly get removed you'll need to use some kind of package manager which keeps track of each file installed each time and would allow you to remove all the changes.
If you installed the original (1.2.2) from source, you could do a make uninstall for that version before you install the newer one. I wouldn't have thought, though, that it'd make too much difference, so why not just keep the old version in there aswell? Any file that has a newer counterpart will be overwritten, and if you start removing files that were used by the older version but no longer used by the newer one, other programs that were dependant on it (and don't know that you've installed a newer version) might go a little awol on you.
Well, I'm not too worried about this issue, but the I posted the topic just to get some general information. In the example I'm talking about, the original version came with the distro, and then I installed the new version from source. I did a 'whereis iptables' and there were two different versions of the iptables binary. The newest one is the one that gets called, so I'm not too worried about it. I was just wondering what other people do.
Well, I most likely do everything the hard way since I know so little, but I don't do an update on source programs. First I remove all the old one before installing the new one. I use locate which will find a lot of the previous files and remove one by one. If you go into the directory of the old source program there may be an uninstall file you can use before you install the newer one. Also in that directory a list of all the files may be in a sub-directory you can remove one by one, or find them in the description of the old program where you originally downloaded it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.