LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to uninstall application in linux (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-uninstall-application-in-linux-608137/)

ufmale 12-20-2007 10:40 AM

how to uninstall application in linux
 
I download src code, compile, and install it

Code:

$ make
$ make install

Now, i want to uninstall it, but I cannot find any rules in the "Makefile" saying uninstall, what can i do?

The problem is specifically for yum-2.4, and yum-2.6
where the "Makefile" has following content

Code:

all: subdirs

clean:
        rm -f *.pyc *.pyo *~ *.bak
        for d in $(SUBDIRS); do make -C $$d clean ; done

subdirs:
        for d in $(SUBDIRS); do make PYTHON=$(PYTHON) -C $$d; [ $$? = 0 ] || exit 1 ; done

install:
        mkdir -p $(DESTDIR)/usr/share/yum-cli
        for p in $(PYFILES) ; do \
                install -m 644 $$p $(DESTDIR)/usr/share/yum-cli/$$p; \
        done
        $(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)/usr/share/yum-cli', 1, '$(PYDIR)', 1)"

        mkdir -p $(DESTDIR)/usr/bin $(DESTDIR)/usr/bin
        install -m 755 bin/yum.py $(DESTDIR)/usr/bin/yum
        install -m 755 bin/yum-arch $(DESTDIR)/usr/bin/yum-arch

        mkdir -p $(DESTDIR)/var/cache/yum

        for d in $(SUBDIRS); do make PYTHON=$(PYTHON) DESTDIR=`cd $(DESTDIR); pwd` -C $$d install; [ $$? = 0 ] || exit 1; done

archive:
        @rm -rf ${PKGNAME}-%{VERSION}.tar.gz
        @rm -rf /tmp/${PKGNAME}-$(VERSION) /tmp/${PKGNAME}
        @dir=$$PWD; cd /tmp; cp -a $$dir ${PKGNAME}
        @rm -f /tmp/${PKGNAME}/${PKGNAME}-daily.spec
        @mv /tmp/${PKGNAME} /tmp/${PKGNAME}-$(VERSION)
        @dir=$$PWD; cd /tmp; tar cvzf $$dir/${PKGNAME}-$(VERSION).tar.gz ${PKGNAME}-$(VERSION)
        @rm -rf /tmp/${PKGNAME}-$(VERSION)       
        @echo "The archive is in ${PKGNAME}-$(VERSION).tar.gz"

daily:
        @rm -rf ${PKGNAME}-%{VERSION}.tar.gz
        @rm -rf /tmp/${PKGNAME}-$(VERSION) /tmp/${PKGNAME}
        @dir=$$PWD; cd /tmp; cp -a $$dir ${PKGNAME}
        @rm -f /tmp/${PKGNAME}/${PKGNAME}.spec
        @mv /tmp/${PKGNAME} /tmp/${PKGNAME}-$(VERSION)
        @dir=$$PWD; cd /tmp; tar cvzf $$dir/${PKGNAME}-$(VERSION).tar.gz ${PKGNAME}-$(VERSION)
        @rm -rf /tmp/${PKGNAME}-$(VERSION)       
        @echo "The archive is in ${PKGNAME}-$(VERSION).tar.gz"


can any exppert around here help me uninstall it?

colucix 12-20-2007 10:53 AM

The last step of installation (make install) is simply a process to copy files somewhere and set their attributes. In most cases the uninstall process is simply going back through the list of operations performed by install. If you have not issued a "make clean", you can run "make install" again and store the resulting messages
Code:

make install > install.log 2>&1
then begin from the end of the file install.log and manually revert all the commands, that is simply remove what has been copied into the destination dirs and eventually remove the newly created ones.

Tinkster 12-20-2007 11:32 AM

Quote:

Originally Posted by ufmale (Post 2997099)
I download src code, compile, and install it

Code:

$ make
$ make install

Now, i want to uninstall it, but I cannot find any rules in the "Makefile" saying uninstall, what can i do?

The problem is specifically for yum-2.4, and yum-2.6
where the "Makefile" has following content

can any exppert around here help me uninstall it?


Have a look at checkinstall; it's build for exactly this, to "wrap"
around the "make install" bit of the "configure && make && make install".

It takes the place of the make install, and produces an RPM, a DEB or
a Slackware TGZ package for you, which you then can easily install,
reinstall or uninstall. Even if you already ran "make install", re-
doing it with checkinstall should let you get rid of all the files
even if the Makefile doesn't have an un-install option.




Cheers,
Tink


All times are GMT -5. The time now is 02:08 PM.