remove commands and unneeded pacakges