You are not logged in.

#1 2009-08-26 17:55:56

B4RR13N705
Member
Registered: 2009-06-08
Posts: 87

Removing packages installed from source

Hi, this is an idiot question, but google or wiki did not give the right solution.

I have (a lot) packages installed from source in my system, and i mean, not by PKG.
I want to remove them, but without using a package manager tool like pacman.
Is there a way?


OS -----> Arch Linux     DE -----> KDE4
CPU ---> 2.66GHz         RAM ---> 512 MB
SWAP -> 2 G                / -------> 10 G
/home -> 50 G             /boot ---> 64 MB

Offline

#2 2009-08-26 18:11:08

darknebula
Member
Registered: 2008-06-25
Posts: 17

Re: Removing packages installed from source

Usually the make uninstall target from the source distribution.

Offline

#3 2009-08-26 18:15:47

ghostHack
Member
From: Bristol UK
Registered: 2008-02-29
Posts: 261

Re: Removing packages installed from source

If the files are not known by the package manager then ultimately you will probably need to locate and remove the files 'by hand'.

Some projects define an 'uninstall' (or similar) Makefile target, so if you still have the original source directories the a simple 'make uninstall' might work for some.

For others, when you installed them what --prefix (if any) did you specify to the 'configure' script?  if you didn't give any then most things default to /usr/local or possibly /opt so looking for files under those directories and then removing them would work.

Offline

#4 2009-08-26 18:32:02

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Removing packages installed from source

one of the great purpose of a package manager is to track files and allow removal of packages !
you would never have guessed that, right?


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#5 2009-08-26 18:38:35

VoodooSteve
Member
From: Vancouver, BC
Registered: 2009-03-31
Posts: 43

Re: Removing packages installed from source

PKGBUILDs are your friend. smile If the program you want isn't in the AUR already, it is very easy to quickly write a PKGBUILD and then you can make a package with makepkg -s and install the program with pacman -U <package name>.

Here are some useful wiki pages:
http://wiki.archlinux.org/index.php/ABS … ild_System
http://wiki.archlinux.org/index.php/PKGBUILD

Last edited by VoodooSteve (2009-08-26 18:39:09)

Offline

#6 2009-08-26 22:45:35

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,217
Website

Re: Removing packages installed from source

If you don't have the original build directories to be able to try 'make uninstall' then you could
1. Write a PKGBUILD to compile the program again with the same options and package it up.
2. makepkg that PKGBUILD
3. pacman -Uf <file>.pkg.tar.gz
4. pacman -R <packgename>

This would install the application (forcefully!) so pacman would then know where the files are, then remove it. No guarantees this would work, especially if versions have changed since files coule be added or removed between versions...

Offline

#7 2009-08-27 16:13:04

B4RR13N705
Member
Registered: 2009-06-08
Posts: 87

Re: Removing packages installed from source

shining wrote:

one of the great purpose of a package manager is to track files and allow removal of packages !
you would never have guessed that, right?

Thats exactly what i wanna know. I (only for educational purposes) want to be able to remove packages that ive installed from source WITHOUT using a package manager... I mean, how can i track the files?


OS -----> Arch Linux     DE -----> KDE4
CPU ---> 2.66GHz         RAM ---> 512 MB
SWAP -> 2 G                / -------> 10 G
/home -> 50 G             /boot ---> 64 MB

Offline

#8 2009-08-27 17:12:08

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: Removing packages installed from source

B4RR13N705 wrote:
shining wrote:

one of the great purpose of a package manager is to track files and allow removal of packages !
you would never have guessed that, right?

Thats exactly what i wanna know. I (only for educational purposes) want to be able to remove packages that ive installed from source WITHOUT using a package manager... I mean, how can i track the files?

Manually.

Offline

#9 2009-08-27 19:02:41

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: Removing packages installed from source

If you routinely install software without PKGFILE, you may try the paco LFS packet manager from community. It is a tool which tracks software in the install process only and allows for easy removal afterwards.

As for the already present software packages there only remains hunt and delete. Otherwise I would try to find more detailed package info in the net. It also helps tracking Makefile, if you still have them.


To know or not to know ...
... the questions remain forever.

Offline

#10 2009-08-27 19:07:23

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: Removing packages installed from source

Isn't Slackware more suited to this approach?  It relies on your Unix knowledge and doesn't specifically provide a package manager (although I think slackpkg may be on the install cd's now)?


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#11 2009-08-27 22:44:47

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,217
Website

Re: Removing packages installed from source

B4RR13N705 wrote:

I mean, how can i track the files?

With a pen and paper.

Offline

#12 2009-08-27 22:51:46

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: Removing packages installed from source

This is why you have a package manager...

For educationaly purposes? That's like saying, for educational purposes, I decided to break my knuckles with a hammer just to see how much it hurts.

Last edited by sand_man (2009-08-27 22:52:52)


neutral

Offline

#13 2009-08-27 22:56:15

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Removing packages installed from source

OK.. question is asked and answered, constructive comments only please.

Offline

Board footer

Powered by FluxBB