restore packages before build