To Solve the Problem that “apt-get -y upgrade” Does Not Work in Crontab (Debian)

If you encounter the problem that you cannot use the command “apt-get -y upgrade” in a crontab file and the error message is the same as the following:

Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
E: Sub-process /usr/bin/dpkg returned an error code (2)

You may check this link for the detailed solution.

Leave a Reply

Your email address will not be published. Required fields are marked *