diff -urN alternatives-0.4.3.orig/alternatives-update alternatives-0.4.3/alternatives-update --- alternatives-0.4.3.orig/alternatives-update 2011-04-12 00:04:53.000000000 +0300 +++ alternatives-0.4.3/alternatives-update 2011-05-17 07:53:54.000000000 +0300 @@ -72,7 +72,10 @@ # echo "remove_alternative:$1" from=$1 int_link=$(echo $from|alternatives_encode) - [ -h $fake_dir/$from ] && rm -f $fake_dir/$from #remove external only if it is symlink + if [ -h $fake_dir/$from ]; then + #remove external only if it is alternatives symlink + readlink "$fake_dir/$from" | grep -q '^/etc/alternatives/links/' && rm -f "$fake_dir/$from" + fi rm -f "$links_dir/$int_link" #always remove internal links }