Skip to content

How do you delete packages compiled by source?

On the rare occasion that I have to do my own install because there is no package in the standard repos or AUR, I have to install from source doing the ./configure, make, make install.

How do I remove these? I'm not sure where they install themselves other than what 'whereis' tells me.

Also, is there a way to install .deb or .rpm on arch ? Like alien?

12 points32 comments
Open on Reddit
About this post
Posted
Archived
Score
12 · 100% up
Kind
Text
ID
bkxfw

Author

1
posts
3
comments
0
media
View profile

33 comments

You're supposed to determine how to compile the package, then write a PKGBUILD for it, compile your own package using it, and install that rather than just using "make install". It makes upgrading and removing a lot cleaner.

23 points
unknown author

Then you add it to the AUR to save the rest of us the headache.

18 points

There are times when I just want to use an application. What's worse than not submitting a package to Aur is sumbitting one and not keeping it up to date.

3 points

What's worse than not submitting a package to Aur is sumbitting one and not keeping it up to date.

Not true. You can upload it and abandon it right away. It already saves time to other people, since most of the time upgrading a package is simply changing the version number.

12 points

It's doesn't take long to make a fairly simple PKGBUILD. You don't have to submit it to the AUR. I made my first one for MzScheme because the one in the AUR is outdated and it didn't take long to copy over a template and fill in values.

10 points

In which case you should compile with ./configure -prefix=/opt/programname

So to remove it all you have to do is rm -rf /opt/programname.

8 points

If it's something I just want to try out, I just compile it in ~/apps/ - and skip the make install step completely. Most things I've had to compile this way run just fine from within home directory. Then, just delete it when you're tired of it.

3 points

You can often do "make uninstall".

18 points

With the mention that you must keep the source folder intact so it has the uninstall make rule.

It's a lot simpler just to write a basic PKGBUILD. (Of course, after you learn how to do it. :D)

4 points

you must keep the source folder intact

Well, if you remember the basic options you built it with (most importantly, --prefix), you can just build it again--you don't even need to install it.

2 points

Haha... this time you made it hard. Next time build it as an arch package and then pacman can take care of it for you!

2 points

With difficulty.

Run make install again and make a note of all the files it copies, then manually hunt down each file and delete it.

Moral of the story: always write a PKGBUILD. Have a template ready so you don't have to look up all the variable names.

1 points
unknown author7 hidden

Or just type 'make uninstall' in the source directory.

3 points

when compiling from source a good trick is to use the --prefix option with configure so that the package will be installed all in one locationg (example: ./configure --prefix=/opt/$PACKAGE_NAME). When you want to remove it you can then just delete the whole directory containing the program.

0 points

Note that this will rarely work for libraries or other dependencies, because the packages that depend on them won't know where to find them, and may not have a --lib-foo=/opt/LibFoo option.

1 points
unknown author1 hidden

Deleted before we saved it.

-4 points

Not when parts of the package to into lib and parts into etc and, well, you get the idea.

3 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.