libraries/db: remove & insert config when saving