def finalize(self): listd = config.rootfs("/etc/apt/sources.list.d") if os.path.isdir(listd): shutil.rmtree(listd) Bootstrap.finalize(self)