Purging configuration files for vyatta-cfg (0.102.0+vyos2+current5) ... Failed to disable unit, unit vyos-router.service does not exist. dpkg: error processing package vyatta-cfg (--purge): installed vyatta-cfg package post-removal script subprocess returned error exit status 1 Purging configuration files for certbot (2.1.0-2) ... ... Errors were encountered while processing: vyatta-cfg
which is because the postrm script tries to disable the vyos-router.service which is _part_ of the package and removed before the hook can run.
Fix appears to be to convert the postrm to a prerm