config dump and remove modules before copying new ones

Signed-off-by: Willi Ye <williye97@gmail.com>