0

I installed libc++ from source using following script. The make uninstall is not supported. What would be the best way to uninstall it?

git clone --depth=1 https://github.com/llvm-mirror/llvm.git llvm-source
git clone --depth=1 https://github.com/llvm-mirror/libcxx.git llvm-source/projects/libcxx
git clone --depth=1 https://github.com/llvm-mirror/libcxxabi.git llvm-source/projects/libcxxabi

export C_COMPILER=clang
export COMPILER=clang++

# Build and install libc++ 
mkdir llvm-build && cd llvm-build
cmake -DCMAKE_C_COMPILER=${C_COMPILER} -DCMAKE_CXX_COMPILER=${COMPILER} \
      -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr \
      ../llvm-source
make cxx
sudo make install-cxxabi install-cxx
Shital Shah
  • 47,549
  • 10
  • 193
  • 157
  • what does `make -n install-cxxabi install-cxx` shows? – dlmeetei Jul 17 '17 at 18:58
  • Related: [what's the opposite of make install](https://stackoverflow.com/questions/1439950/whats-the-opposite-of-make-install-i-e-how-do-you-uninstall-a-library-in-li). I recommend `checkinstall`, which will monitor what gets installed. – Mark Plotnick Jul 18 '17 at 02:33

1 Answers1

1

Well, after lot of searching, it is clear that there is no automatic or even semi-automatic way to uninstall when make unintsall is not implemented. There are two ways to get around this:

  1. If using cmake then run the install again but set the flag like -DCMAKE_INSTALL_PREFIX=./output. This will cause cmake to put all files in ./output. Now you can observe the files, and manually delete them. I think by default cmake would put these files at /usr/local.

  2. Another cool trick you can use if install_manifest.txt file is generated: cat install_manifest.txt | xargs echo sudo rm | sh.

Shital Shah
  • 47,549
  • 10
  • 193
  • 157