LoginSignup
10
11

More than 5 years have passed since last update.

ソースコードからインストールしたGitをアンインストール

Posted at

こんなあなたに

yumなくソースコードからインストールしたGit
パッケージが足りてなくて動かないではないか!
よし、make uninstallだ!

# make uninstall
make: *** ターゲット `uninstall' を make するルールがありません.  中止.

# cat Makefile | grep uninstall
#

▂▅▇█▓▒░(’ω’)░▒▓█▇▅▂うわあああああああ


インストールされたものを、全部消す

今のところ問題はなさそうですが、自己責任でお願いします。


インストールされたものを確認

1. 指定したディレクトリを/としてインストールする

# mkdir /tmp/git-install-test
# make install DESTDIR=/tmp/git-install-test


2. インストールされたファイルのリストを出力

# find /tmp/git-install-test -type f -print > /tmp/git-install-filelist.txt

-type fでディレクトリは出力しないのが味噌


3. ファイルリストを修正

before
/tmp/git-install-test/usr/local/lib64/perl5/perllocal.pod
/tmp/git-install-test/usr/local/lib64/perl5/auto/Git/.packlist
/tmp/git-install-test/usr/local/libexec/git-core/git-sh-setup
...省略...

全行の/tmp/git-install-testを消去

:%s/\/tmp\/git-install-test//g
after
/usr/local/lib64/perl5/perllocal.pod
/usr/local/lib64/perl5/auto/Git/.packlist
/usr/local/libexec/git-core/git-sh-setup
...省略...


ファイルリストにしたがって全消し

# cat /tmp/git-install-filelist.txt | xargs rm -f
# git --version
-bash: /usr/local/bin/git: そのようなファイルやディレクトリはありません



必要なパッケージをよく確認してからインストールしましょうね(自戒)

参考

10
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
11