remove useless links of packages