LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 08-05-2008, 09:19 AM   #1
bdaedalus359
LQ Newbie
 
Registered: Aug 2008
Posts: 12

Rep: Reputation: 0
couple of newbie questions


I migrated from Windows about 6 months ago to Linux. I started with Kubuntu and eventually landed on Fedora and so far, I've liked Fedora the best in spite of disliking yum.

So my question is more or less and Linux question.. Now, Windows has a registery system that can (or will) get really cluttered if you don't take care of it and clean it from time to time. Also, Windows has a really inefficient way to processing programs, especially during start up that can slow the os down. For example, if you deleted or uninstalled a program incorrecly, stupid Windows will sit there, wasting time and energy trying to find it even though its not there.

Is there a way to safely "uninstall" programs with Linux? For example, if I install a program by compiling the source code, and I don't want it anymore, is it safe for me to just delete the directory and never think twice about it?

And on a side note, how to I control, either add or remove programs that start up when the OS boots? I'd like to have Amarok start up when I boot but I dunno how

Thanks guys.
 
Old 08-05-2008, 09:35 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by bdaedalus359 View Post
Is there a way to safely "uninstall" programs with Linux? For example, if I install a program by compiling the source code, and I don't want it anymore, is it safe for me to just delete the directory and never think twice about it?
When you install from source try to keep the installation source directory. You eventually can run
Code:
make uninstall
later to completely remove the software from your system. It is not a matter of just delete a directory, since the files are installed in different locations, depending on the PREFIX you have chosen during the configure step (or the default one) and on the type of the installed file (binaries, libraries, man pages and so on usually are installed in different directories). Also, don't run make clean or make distclean after the installation, otherwise all the configure options and the install logs are lost.

In brief when you install from source you have to simply follow the basic steps:
Code:
./configure --prefix=/path/to/installation
make
make install
then leave the source directory as it is and later you can run make with the uninstall target. If you want to test a software without spreading the files over the systems, you can install them in the source directory itself. For example, suppose you want to install NetCDF libraries from source and untar the source code in /opt. You will have a source directory called
Code:
/opt/netcdf-3.6.2
inside the directory you will run
Code:
./configure --prefix=/opt/netcdf-3.6.2
in this case all the binaries, libraries, man pages etc. will be installed under /opt/netcdf-3.6.2/bin, /opt/netcdf-3.6.2/lib, /opt/netcdf-3.6.2/man respectively. In this case you can safely remove the entire directory and have the NetCDF libraries uninstalled.

On the other hand the default locations will be /usr/local/bin, /usr/local/lib, /usr/local/man and so on. In this case the make uninstall command is your friend.


Quote:
And on a side note, how to I control, either add or remove programs that start up when the OS boots? I'd like to have Amarok start up when I boot but I dunno how
It depends on the Desktop Manager you're using. In GNOME go to System --> Preferences --> Personal --> Sessions and add programs you want to run at startup.
 
Old 08-05-2008, 09:38 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
If you install with a package manager, use the package manager to uninstall. If you use the rpm command then use the -e (erase) option to remove the package. If you installed from source, use "./make uninstall" in the source directory.

For packages you install from source you might want to use "./configure --prefix=/usr/local" if it isn't the defaullt. The /usr/local directory won't be touched during an upgrade. It would also make it easier to determine which packages you installed from source.

If you are compiling a common package however, then it may be better to use "/" or "/usr" depending on the package. Otherwise you may end up with two versions. The versions installed already from an rpm package, and the one you compiled.
 
Old 08-05-2008, 10:27 AM   #4
Berticus
Member
 
Registered: Jul 2005
Distribution: Arch
Posts: 159

Rep: Reputation: 31
In the event that make uninstall doesn't work --- and there will be times when it doesn't work --- simply deleting the binaries and libraries is fine as long as no other programs depend on them. You can find out where they are installed using the whereis command.

If you want to delete the configuration files, you'll have to find out for yourself where the global configurations are, if there are global configurations, and look in ~ for user configurations.
 
Old 08-05-2008, 10:36 AM   #5
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
It is also a good habit to save the output of make install, for example by
Code:
make install 2>&1 | tee install.log
in this way you see the output on the screen and save it to install.log at the same time (this is the aim of the tee command). After that you will have a log with all the operations performed by make install. If something goes wrong with make uninstall you can always remove the installed files manually (as Berticus already suggested). It may be a tedious job, anyway!
 
Old 08-06-2008, 03:36 AM   #6
resetreset
Senior Member
 
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Rep: Reputation: 62
i dont know which distro you use, but for *server* type services in fedora you type "ntsysv". for gui stuff like your player, maybe there's something in gnome or kde for that, i dont know.
 
  


Reply



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
Couple of questions from a newbie ltjmax Linux - Newbie 4 07-04-2006 05:03 PM
a couple of newbie questions... tjb Fedora 1 12-23-2004 09:59 PM
Couple of questions from a newbie logophobia Linux - Newbie 9 12-02-2004 06:13 AM
Couple of newbie questions acidblue Slackware 3 07-22-2004 12:42 AM
couple of newbie questions... InsaneLampshade Linux - Newbie 2 02-07-2004 08:49 PM

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

All times are GMT -5. The time now is 03:24 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