<div dir="ltr">On my freshly installed ubuntu 18.06 my cron job use 'apt-get' as 'apt' is not recommended to be used in scripts. however, 'apt-get update' will keep back my packages while 'apt upgrade' will upgrade them, this is not expected.<div><br></div><div><div><br></div><div>root@do-u1804:~# apt update</div><div>Hit:1 <a href="https://repos.sonar.digitalocean.com/apt">https://repos.sonar.digitalocean.com/apt</a> main InRelease</div><div>Get:2 <a href="http://security.ubuntu.com/ubuntu">http://security.ubuntu.com/ubuntu</a> bionic-security InRelease [83.2 kB]                        </div><div>Hit:3 <a href="http://ppa.launchpad.net/certbot/certbot/ubuntu">http://ppa.launchpad.net/certbot/certbot/ubuntu</a> bionic InRelease                              </div><div>Get:4 <a href="http://nyc2.mirrors.digitalocean.com/ubuntu">http://nyc2.mirrors.digitalocean.com/ubuntu</a> bionic InRelease [242 kB]                        </div><div>Hit:5 <a href="http://nyc2.mirrors.digitalocean.com/ubuntu">http://nyc2.mirrors.digitalocean.com/ubuntu</a> bionic-updates InRelease        </div><div>Hit:6 <a href="http://nyc2.mirrors.digitalocean.com/ubuntu">http://nyc2.mirrors.digitalocean.com/ubuntu</a> bionic-backports InRelease</div><div>Fetched 325 kB in 4s (92.9 kB/s)</div><div>Reading package lists... Done</div><div>Building dependency tree      </div><div>Reading state information... Done</div><div>4 packages can be upgraded. Run 'apt list --upgradable' to see them.</div><div><br></div><div>root@do-u1804:~# apt upgrade</div><div>Reading package lists... Done</div><div>Building dependency tree      </div><div>Reading state information... Done</div><div>Calculating upgrade... Done</div><div>The following NEW packages will be installed:</div><div>  python3-ndg-httpsclient python3-requests-toolbelt</div><div>The following packages will be upgraded:</div><div>  certbot python3-acme python3-certbot python3-certbot-apache</div><div>4 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.</div><div>Need to get 380 kB of archives.</div><div>After this operation, 350 kB of additional disk space will be used.</div><div>Do you want to continue? [Y/n] n</div><div>Abort.</div><div><div style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">root@do-u1804:~# apt-get update</div><div style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Get:1 <a href="http://mirrors.digitalocean.com/ubuntu">http://mirrors.digitalocean.com/ubuntu</a> bionic InRelease [242 kB]</div><div style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Hit:2 <a href="http://mirrors.digitalocean.com/ubuntu">http://mirrors.digitalocean.com/ubuntu</a> bionic-updates InRelease                              </div><div style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Hit:3 <a href="http://mirrors.digitalocean.com/ubuntu">http://mirrors.digitalocean.com/ubuntu</a> bionic-backports InRelease                            </div><div style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Get:4 <a href="http://security.ubuntu.com/ubuntu">http://security.ubuntu.com/ubuntu</a> bionic-security InRelease [83.2 kB]                        </div><div style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Hit:5 <a href="http://ppa.launchpad.net/certbot/certbot/ubuntu">http://ppa.launchpad.net/certbot/certbot/ubuntu</a> bionic InRelease                              </div><div style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Hit:6 <a href="https://repos.sonar.digitalocean.com/apt">https://repos.sonar.digitalocean.com/apt</a> main InRelease                                      </div><div style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Fetched 325 kB in 3s (99.9 kB/s)                                                              </div><div style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Reading package lists... Done</div></div><div><br></div><div>root@do-u1804:~# apt-get upgrade</div><div>Reading package lists... Done</div><div>Building dependency tree      </div><div>Reading state information... Done</div><div>Calculating upgrade... Done</div><div>The following packages have been kept back:</div><div>  certbot python3-acme python3-certbot python3-certbot-apache</div><div>0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.</div><div><br></div></div></div>