LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-09-2005, 05:47 PM   #1
whatpot
Member
 
Registered: Feb 2005
Distribution: Kubuntu and Debian
Posts: 32

Rep: Reputation: 15
can i delete the folder i compile from?


hi i was wondering

i compile from source using ./configure then make and last make install from a folder X on my desktop

now can i delete the folder X after i have compiled the program?

under what curcumstances can i do so?

is there any command i have to pass while "make" or "make install" so that i can delete the source folder X from my desktop?

last one
will i be able to uninstall the program if i delete the source folder X?

thankyou
 
Old 04-09-2005, 06:23 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
You can safely remove any source folders used to compile a program. Some come with an uninstall script but most don't even bother with those. If one does have an uninstall script and you removed the source directory, you'll just have to remove all the files placed on your system manually..
 
Old 04-09-2005, 06:25 PM   #3
aka Shiva
LQ Newbie
 
Registered: Apr 2005
Location: FWI
Distribution: RedHat
Posts: 9

Rep: Reputation: 0
hi,

When install is complete "make clean" removes objects file from the sources folder. But if you delete it, you won't be able to uninstall your software (make uninstall).

You can move this folder to your home directory.
#mv [folder name] /root/downloads/[folder name] for example.

Last edited by aka Shiva; 04-09-2005 at 06:27 PM.
 
Old 04-09-2005, 06:48 PM   #4
chbin
Member
 
Registered: Mar 2005
Distribution: slackware-current
Posts: 379

Rep: Reputation: 31
You really shouldn't be doing a make install to install the package. Your system will be spamed with files and you wont be able to keep track of it.

Doesn't Suse have some kind of package system you could use? I use slack so I'm not exactly sure what is it. Basically I replace "make install" w/ "makepkg" or "checkinstall" and it creates a nice little package that I can remove anytime. Keeping all the source around just to be able to remove apps doesn't sound like a good way of doing things.
 
Old 04-09-2005, 09:00 PM   #5
oot
Member
 
Registered: Dec 2002
Distribution: Slackware 12.0
Posts: 240

Rep: Reputation: 30
If you do need/want to build something from source (I have to do it a lot, since a lot of people don't release Slackware packages, but if you're on SuSE you should be able to get rpms for most things), you can delete everything except the makefile when you are done, and usually if it has an unintall option it will continue to work.

What I've done is created a directory to keep old makefiles in for if I want to uninstall. For example, let's say I just installed Gaim from source... now that I'm done, here's the steps I'd take

kk@boxofrain:~/gaim-1.0.0$ cp Makefile ../makefiles/Makefile.gaim
kk@boxofrain:~/gaim-1.0.0$ cd ..
kk@boxofrain:~$ rm -r gaim-1.0.0

On the first line, it is important to use Makefile.gaim or some other descriptive name for your file, since you can't have more than one thing named just "Makefile" in the same directory. (eg. your makefiles directory will eventually contain "Makefile.gaim" "Makefile.sylpheed" "Makefile.galeon" etc.).

When you want to uninstall it, just "make -f makefiles/Makefile.gaim uninstall"
 
Old 04-09-2005, 09:20 PM   #6
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
just don't delete the source code for the kernel

beyond that there are rare times you want to keep it but generally if you don't know already you will need it later you don't need it later

keeping the Makefiles for "make uninstall" as suggested is a good idea
 
Old 04-09-2005, 10:18 PM   #7
chbin
Member
 
Registered: Mar 2005
Distribution: slackware-current
Posts: 379

Rep: Reputation: 31
Keeping the makefiles around is a very interesting idea. I never though of it to tell you the truth.

However, using them to uninstall you are assuming the uninstall function in the script is complete. Sometimes, often they are not complete uninstalles. Also, some don't even have this functionality in them.
 
Old 04-10-2005, 04:56 AM   #8
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
Quote:
Originally posted by chbin
You really shouldn't be doing a make install to install the package. Your system will be spamed with files and you wont be able to keep track of it.

Doesn't Suse have some kind of package system you could use? I use slack so I'm not exactly sure what is it. Basically I replace "make install" w/ "makepkg" or "checkinstall" and it creates a nice little package that I can remove anytime. Keeping all the source around just to be able to remove apps doesn't sound like a good way of doing things.
You use slack but you don't use make install?! Don't tell me you wait for slack packages before you install any software? I'd never install anything if I did that. And make install very rarely 'spams' your system with files, most commonly you get one binary in /usr/local/bin and one folder in /usr/local/share/<programname> Not exactly hard to keep track of....
 
Old 04-10-2005, 04:58 AM   #9
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
Quote:
Originally posted by foo_bar_foo
just don't delete the source code for the kernel
Why not? It's entirely safe to do so as long as you don't intend to compile anything that requires them. I think you're confusing that with the kernel headers under /usr/include/linux
 
Old 04-10-2005, 04:59 AM   #10
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
Quote:
Originally posted by Komakino
You use slack but you don't use make install?! Don't tell me you wait for slack packages before you install any software? I'd never install anything if I did that. And make install very rarely 'spams' your system with files, most commonly you get one binary in /usr/local/bin and one folder in /usr/local/share/<programname> Not exactly hard to keep track of....
think you completely missed his point....
 
Old 04-10-2005, 05:13 AM   #11
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
Quote:
Originally posted by Komakino
You use slack but you don't use make install?! Don't tell me you wait for slack packages before you install any software? I'd never install anything if I did that. And make install very rarely 'spams' your system with files, most commonly you get one binary in /usr/local/bin and one folder in /usr/local/share/<programname> Not exactly hard to keep track of....
I'm not his lawyer, but i think what he meant is instead of doing a raw "make install" he either uses checkinstall or does

make install DESTDIR=/something/
and uses makepkg
to pack it before the installation in order to be able to delete/update the programs.

I also always use makepkg to pack my compiled programs before the installation.

You may also get some libraries in /usr/local/lib (hard to track), some man pages, some configuration files in /usr/local/etc.
you do not get the documantation

You need to pack your programs if you don't want to do a fresh install every year.
If you update your distro, and some programs that you have installed from source are shipped with the new version, you may mess things up

Last edited by perfect_circle; 04-10-2005 at 05:21 AM.
 
Old 04-10-2005, 08:07 AM   #12
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
Quote:
Originally posted by perfect_circle

You need to pack your programs if you don't want to do a fresh install every year.
If you update your distro, and some programs that you have installed from source are shipped with the new version, you may mess things up
I tend not to update the whole distro. If something needs upgrading then I'll just do that from source. I certainly can't be bothered with all that checkinstall stuff! It's not like having multiple versions of libraries causes problems and I rarely remove anything!
 
Old 04-10-2005, 09:18 AM   #13
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
Quote:
Originally posted by Komakino
I tend not to update the whole distro. If something needs upgrading then I'll just do that from source. I certainly can't be bothered with all that checkinstall stuff! It's not like having multiple versions of libraries causes problems and I rarely remove anything!
Packing things manually using makepkg is a burden, personally I like that, and I try to do it right. I take care of the permissions, I always make sure the executables have root.bin for owner.group, strip the libraries and the executable, gz the man and the info pages, add the documentation, create SlackBuild scripts,

but checkinstall , just monitors make install. You just have to add a small packet description and that is optional. Obviously you have never even tried it, because it's not more difficult than just doing make install. In the directory the Makefile exists you simply do "checkinstall" instead of "make install". The patched version for slackware is in the /extra of the 3rd cd. It's just a few kbytes. You may download it from a mirror. Not wanting to pack your programs if you know the chances is your choice, but I don't think you should advise newbies to do so. Threads like "how do i uninstall a program I compiled" are posted All the time.

whatpot, check if checkinstall is installed in your distro. I haven't installed suse for years, but I have a SuSE 9.1 dvd and I've checked. There is a /suse/i586/checkinstall-1.6.0beta3-8.i586.rpm in there.
Instead of make install do checkinstall, and the package you install will be added in your rpm database. So you can handle it as a normal rpm and remove it with
rpm -e <package name>
 
Old 04-10-2005, 12:39 PM   #14
chbin
Member
 
Registered: Mar 2005
Distribution: slackware-current
Posts: 379

Rep: Reputation: 31
Why would anyone not want to use some sort of package management??? I don't get it. How hard is it to build from source and then make a package? Otherwise when you just slam version after version of an app, you are going to get orphaned files.

After upgrading enough libraries and not removing the old, it is inevitable that you are going to have problems. What gets linked to what, what headers does new source use to compile against, etc. That is totally not necessary to even deal with.
 
Old 04-10-2005, 12:44 PM   #15
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
Quote:
Originally posted by chbin
Why would anyone not want to use some sort of package management??? I don't get it. How hard is it to build from source and then make a package? Otherwise when you just slam version after version of an app, you are going to get orphaned files.

After upgrading enough libraries and not removing the old, it is inevitable that you are going to have problems. What gets linked to what, what headers does new source use to compile against, etc. That is totally not necessary to even deal with.
Because I don't like package management. I rarely if ever remove anything. If you install a new library + headers the pkg-config pc file is overwritten. Any new apps will use the newest headers and libraries, any already installed apps will continue to link against whatever they were compiled against. I've not had a problem in 18 months. It's not so much that I'm opposed to checkinstall, I've just never really gotten around to trying it...I guess because I've never needed it.
 
  


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
seems like I delete my /etc folder. bladehaze Debian 9 09-12-2005 11:47 AM
How do I delete a folder and everything in it? wuya Linux - Newbie 3 04-22-2005 02:03 PM
Unable to delete folder arctuniol Red Hat 2 10-11-2004 02:07 PM
delete source folder? machiner Linux - Software 2 07-27-2004 03:37 PM
How to delete the whole folder without being prompted anything conkhikho Linux - Newbie 1 10-27-2003 01:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:09 AM.

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