This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Uninstall a source install?


"Mark Williams (MWP)" wrote:

> I just made a complete screwup of a source compile and install of the latest GCC
> from CVS.
> 
> Now i wish to remove all the files ive just installed.
> 
> Whats the best way to do this?
> 
> I know "make uninstall" isnt supported.
> Is there any other automated way?

You can sort of get an approximation of an uninstall by doing a "make
install" to a temporary DESTDIR and then using its contents as a list of
files to remove:

make install DESTDIR=/tmp/gccinst
find /tmp/gccinst | sed -e s,/tmp/gccinst,, | \
   (while read F; do rm "$F"; done)

You might want to try this first using 'echo "$F"' instead of 'rm "$F"'
to make sure it's going to do the right thing.  And this requires that
you still have the build directory that you used, or at least one
configured identically.  And it won't compensate for any local files
that might have been modified.  In short, it's not going to always work,
but it might get you close if you're otherwise lost.

Brian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]