How to remove a packages in VM Template Start Script


my “Start Script” contains this:

/bin/echo “adminuser:TEST” | chpasswd ; apt-get -y remove xscreesaver ; touch /root/TEST.txt

From that line, chpasswd and touch runs OK, but apt-get no… If I execute first apt-get and, then, chpasswd, only runs OK chpasswd

Why? why is not apt-get running OK?