LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   couple of newbie questions (https://www.linuxquestions.org/questions/linux-newbie-8/couple-of-newbie-questions-660618/)

bdaedalus359 08-05-2008 09:19 AM

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 :confused:

Thanks guys.

colucix 08-05-2008 09:35 AM

Quote:

Originally Posted by bdaedalus359 (Post 3237434)
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 :confused:
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.

jschiwal 08-05-2008 09:38 AM

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.

Berticus 08-05-2008 10:27 AM

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.

colucix 08-05-2008 10:36 AM

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! ;)

resetreset 08-06-2008 03:36 AM

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.


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