save before removing dependencies