git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

apt update behaves differently from apt-get update


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.


root at do-u1804:~# apt update
Hit:1 https://repos.sonar.digitalocean.com/apt main InRelease
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2
kB]
Hit:3 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic InRelease

Get:4 http://nyc2.mirrors.digitalocean.com/ubuntu bionic InRelease [242
kB]
Hit:5 http://nyc2.mirrors.digitalocean.com/ubuntu bionic-updates InRelease

Hit:6 http://nyc2.mirrors.digitalocean.com/ubuntu bionic-backports InRelease
Fetched 325 kB in 4s (92.9 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
4 packages can be upgraded. Run 'apt list --upgradable' to see them.

root at do-u1804:~# apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  python3-ndg-httpsclient python3-requests-toolbelt
The following packages will be upgraded:
  certbot python3-acme python3-certbot python3-certbot-apache
4 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 380 kB of archives.
After this operation, 350 kB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.

root at do-u1804:~# apt-get update
Get:1 http://mirrors.digitalocean.com/ubuntu bionic InRelease [242 kB]
Hit:2 http://mirrors.digitalocean.com/ubuntu bionic-updates InRelease

Hit:3 http://mirrors.digitalocean.com/ubuntu bionic-backports InRelease

Get:4 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2
kB]
Hit:5 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic InRelease

Hit:6 https://repos.sonar.digitalocean.com/apt main InRelease

Fetched 325 kB in 3s (99.9 kB/s)

Reading package lists... Done

root at do-u1804:~# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  certbot python3-acme python3-certbot python3-certbot-apache
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-devel-discuss/attachments/20180622/c47e40e9/attachment.html>