Make define for update alternatives
remove unnecessary code
fix wrong usage