Can't delete deprecated theme component from CLI - failed to bootstrap

Ok, so the solution was to set up a fresh discourse installation, restore from backup and then delete component that was causing an issue.