The line "sudo apt autoremove nessusagent" asks for prompt Y/n I always have to say Y. Trying to find a way to do automatically I tried to add <<- Y at the end of the command it didn't work.
schemaVersion: "2.2" description: "Command Document Example JSON Template" parameters: Message: type: "String" description: "Hello World!" default: "Hello" mainSteps:
There's an option for that
sudo apt autoremove --yes nessusagent
See man apt-get