LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Aksing first Question: Uninstalling without Softwarecenter/Synaptic (https://www.linuxquestions.org/questions/linux-general-1/aksing-first-question-uninstalling-without-softwarecenter-synaptic-814113/)

Gaahl 06-14-2010 02:56 PM

Aksing first Question: Uninstalling without Softwarecenter/Synaptic
 
Hallo everyone,

according to the system recommendation I will make a post. Let me shortly introduce myself:

I am a person who is interested in Software development, as well as web development. So far I used just Windows as OS, and did much in the .NET framework. Now I wanna switch to Ubuntu and make some programs with Java using Eclipse. Also do I want to design/develop web pages using Ubuntu.

I had a nice start in Ubuntu and I think I have learned the very basics. So let's come to my first Question:

How can I uninstall a program without using the Synaptic Manager nor the Softwarecenter?

How did I came to this Question? -> In Windows, I had a working WAMP set up. Now I want to set up a LAMP in Ubuntu. There is a packet ready to install a LAMP, but I found it too late. Too late means, I already have installed the Apache myself, using Introductions from a book.

The book is an open 'Galileo' book and can be found here:

http://www.oreilly.de/german/freebooks/einmysql2ger/

in German.

The used shell commands are/were:

# tar -xzvf httpd-2.2.4.tar.gz

# cd httpd-2.2.4

# ./configure --enable-layout=Apache --enable-so \
--enable-mods-shared=most

# make

# make install

After this installation, the Apache Server has been installed to

/usr/local/apache2

Now is my plan to get rid of this installation and use the LAMP offered in the Synaptic Manager.

How can I uninstall the Apache Server? Or How can I uninstall something by my self in general? I do not want to create a mess. I guess it is not enough to delete just the whole Apache folder, right?

I'm glad for every answer and hints to get teach myself about in- and uninstalling software. The Softwaremanager and Synaptic is fine, but I also want to be able to do thing on my own.

Thanks in anticipation,

Gaahl

GrapefruiTgirl 06-14-2010 03:04 PM

Hi, welcome to LQ!

My first suggestion would be to see if the Makefile that you used to install the Apache, has a UN-install option built in. Many do, but some do not. Without using the package-manager, I believe that would be the simplest solution, and it **should** remove everything that it installed (no guarantee, but should be very close).

You would go into the source folder, repeat the same `configure` & `make` as you did before doing "make install", and simply do "make uninstall" instead. You can examine the Makefile (or use "make help") to see if they use a different word than "uninstall" or "remove".

If there's no remove or un-install option to the Makefile, next idea would be to run "make" again as you did, and then run "make install" and direct the output to a file, like a log. Then using that installation log, you could either manually, or with a quick little script, semi-efficiently remove everything that gets installed.

Third option -- not a good idea really, but use the package manager to install, and then remove, apache. This I wouldn't really suggest, because it may install to a different location than the version you installed, and so wouldn't do much to remove the one you installed.

Anyhow, let us know how you make out with option 1 or 2, and/or if neither helps, keep us posted -- an Ubuntu user or someone else, may have another idea.

Sasha

Gaahl 06-15-2010 03:24 AM

Hej GrapefruiTgirl,

thanks for the welcome and thanks for the quick reply!

I checked out the first idea you had. Hence, I unpacked the package again and configured the source files before compiling. Then I tried #make uninstall with the result "No rule to make target 'uninstall'. Stop" The same thing happened with remove. According to the outputs of the #make -help command, there is no option to uninstall, at least I cant figure one out.

Also I viewed the Makefile in gedit, but again I cant find anything indicating to uninstall options.


Well, after that I ran a #make install > makeInstallLog.txt command. I am not sure if I can read/interpret all the output written there, but it seems that files are created in the /usr/local/apache2/ folder, e.g.:

Libraries have been installed in:
/usr/local/apache2/lib

Furthermore I checked out the #./configure --help |less command. There I found the following interesting anouncement:

Code:

By default, `make install' will install all the files in
`/usr/local/apache2/bin', `/usr/local/apache2/lib' etc.  You can specify
an installation prefix other than `/usr/local/apache2' using `--prefix',
for instance `--prefix=$HOME'.

According to this, because I did a default installation, I guess it IS right just to delete the whole apache2 folder, no?

This leads me to another question:

Installing something in Linux, does this mean just to create folders and files? I mean, I read that there are no entries in a registration necessary, like in Windows. But is it like this, that an installation does nothing more than create files/folders (and maybe configurate some files)?

It feels a little strange, but I think this is because of using Windows too long. In Windows I never came to the idea just to delete files to uninstall something. Is this different in Linux, can I get rid of a software/all files of a software just by deleting them all, assumed I find them?

And one more thing troubling my mind: How do I install thing in Linux in general, is it normaly to use synaptic or the Softwaremanager? Because I heared from a Ubuntu user, that installing software is not like in Windows, because one has to do many stuff on his own using the shell. Is there a rule when to use (not to use) Synaptic?


Sorry if I post too many, maybe documented or spoken about things. My primary goal is to uninstall the apache, so that I can use the LAMP offered in Synaptic. For the other questions, I surely would be glad to get them answered, but also to get some links to read and help/inform myself.


So, after all this, do you (anyone) think it is ok just to delete the whole apache folder?

Again, thanks in anticipation!!

Regards Gaahl

XavierP 06-15-2010 03:56 AM

Moved: This thread is more suitable in Linux-General and has been moved accordingly to help your thread/question get the exposure it deserves.

GrapefruiTgirl 06-15-2010 05:15 AM

Looks like you have examined the situation pretty well. It does appear based on the quote you snipped from the configure --help command, that it installs "all" the files into that one location. If that is the case, then yes, simply deleting the folder and all files in there, will remove the installation. HOWEVER: It is common for just about anything that installs, and which uses any configuration files (like Apache's httpd.conf file for example) to put such configuration files in the /etc system folder somewhere. Perhaps you should look in the /usr/local/apache2 folder and see if there's an /etc sub-folder in there to make sure -- and if there is not, then have a look in your main /etc folder and see if your manual apache installation left any files in there. Ultimately, if there happen to be a couple odds & ends lying around that you do not remove, I would not think it too critical -- most times, the next installation of the package will over-write any old leftovers (hopefully!)

As for your other questions:

"Does installing something in Linux just create files & folders?"

Yep, that's pretty much how it goes! There's no registry such as Windows has -- just the binaries (executables) which go in the /bin directories; the libraries (like Windows DLL's) which go in the /lib directories; and config files, which generally go into an /etc folder. There are other things, and some other locations commonly used, but this is the basic idea.
Assuming you can find every file installed by a package, you can indeed just delete evey one of them, and that package is now "uninstalled" -- no registry left, no cryptic hidden files somewhere in some hidden location -- just gone!

HOWEVER: If you have installed something with your package-manager, especially on a distro like Ubuntu which is very "automatic" when it comes to installing things, it is ALWAYS best to use the package-manager to remove it. Every Linux Distro has some form of package-management, and it is advisable to use it whenever possible, until/unless you have the experience (or it's an absolute necessity) to install things without the package manager.

With Ubuntu, to date anyhow and to my knowledge as a not-Ubuntu-user, the package manager is Synaptic (or SoftwareManager), which are basically GUI front-ends for apt-get. This set of tools is what you should always use to install, remove, and upgrade packages on your Ubuntu. Other Linuxes have their own tools, not necessarily the same, nor even similar necessarily. With Ubuntu, you do not have to use the shell and give commands as often as you may with other Linuxes, as Ubuntu is designed to be pointy-clicky and easy to learn and use, but sometimes, if you want to quickly search/install/upgrade a software package, you might give an apt-get command or two on the command-line, to do the job, instead of starting up the Synaptic thing and clicking through it.

Is there a rule "when Not" to use Synaptic? Not really, no. Synaptic (or apt-get, whatever interface to the package manager you like) should always be used to keep your system as neat and tidy as possible. However, there are **some** things, such as some video card drivers, which at times are required to be installed by hand, from a command-line, for various reasons. Usually this is because either Ubuntu Package Repository does not offer one new enough for you (maybe you have brand new hardware, and the available driver in the repo is not new enough yet), or maybe because you want to install something that is not available at all in the repository.

Hopefully this addresses most/all of your questions, but if not, do feel free to ask some more -- we'll do our best to explain!

Sasha

Gaahl 06-15-2010 07:32 AM

Hi again,

thank you very much for your answer, it gave me some more overview and understanding. I deleted the apache2 folder with everything in it. Afterwards I installed the packages that came along with 'mark packages by task -> LAMP' in the Synaptic Manager.

After the installation of those packages, I tried to use the Server by entering 'http://localhost/' in the browser's url field. The known 'It works!' page had been shown, but when I looked for the htdocs folder to go on and e.g. design own pages, I had problems. Also did I want to configure the Apache Server, but the whole /etc/apache2/httpd.conf file is empty. Now I'm again confused. But I think it's better to discuss these problems in another section of the forum.

Thanks again for your help!!

Regards Gaahl

GrapefruiTgirl 06-15-2010 07:38 AM

Glad to have helped some. If you feel this question is answered to your satisfaction, you can mark it SOLVED using the Thread Tools menu near the top.

Meanwhile, best of luck setting up the LAMP -- if you run into troubles, the 'Server' forum is probably the best place to look or ask for help on that subject.

Sasha :)


All times are GMT -5. The time now is 10:21 PM.