autoremove removing loads of packages yesterday

Asked by Stephen Bush

Yesterday one of our long standing servers on 22.04 in Amsterdam started removing around 100 packages including main line stuff.
Restoring a snapshot from a day ago and the problem re-occurred.
Today the problem does not occur.
Was there some error in the apt repository?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu update-manager Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Do you have any PPAs added here? Is it affecting many systems or just a handful?

Revision history for this message
Stephen Bush (steve-bush) said :
#2

No I dont have any ppa's here unless created a decade ago maybe.

We havent got anything unusual installed. Just apache+php.

Log started: 2022-09-22 13:03:28
(Reading database ... ^M(Reading database ... 5%^M(Reading database ... 10%^M(Reading database ... 15%^M(Reading database ... 20%^M(Reading database ... 25%^M(Reading database ... 30%^M(Reading database ... 35%^M(Reading database ... 40%^M(Reading database ... 45%^M(Reading database ... 50%^M(Reading database ... 55%^M(Reading database ... 60%^M(Reading database ... 65%^M(Reading database ... 70%^M(Reading database ... 75%^M(Reading database ... 80%^M(Reading database ... 85%^M(Reading database ... 90%^M(Reading database ... 95%^M(Reading database ... 100%^M(Reading database ... 38875 files and directories currently installed.)
Preparing to unpack .../gzip_1.10-4ubuntu4.1_amd64.deb ...
Unpacking gzip (1.10-4ubuntu4.1) over (1.10-4ubuntu4) ...
Setting up gzip (1.10-4ubuntu4.1) ...
(Reading database ... ^M(Reading database ... 5%^M(Reading database ... 10%^M(Reading database ... 15%^M(Reading database ... 20%^M(Reading database ... 25%^M(Reading database ... 30%^M(Reading database ... 35%^M(Reading database ... 40%^M(Reading database ... 45%^M(Reading database ... 50%^M(Reading database ... 55%^M(Reading database ... 60%^M(Reading database ... 65%^M(Reading database ... 70%^M(Reading database ... 75%^M(Reading database ... 80%^M(Reading database ... 85%^M(Reading database ... 90%^M(Reading database ... 95%^M(Reading database ... 100%^M(Reading database ... 38874 files and directories currently installed.)
Removing ubuntu-server (1.481) ...
Removing apport (2.20.11-0ubuntu82.1) ...
Removing byobu (5.133-1) ...
Removing certbot (1.21.0-1build1) ...
Removing cloud-init (22.2-0ubuntu1~22.04.3) ...
Removing command-not-found (22.04.0) ...
Removing etckeeper (1.18.16-1) ...
Removing landscape-common (19.12-0ubuntu13) ...
Removing software-properties-common (0.99.22.3) ...
Removing python3-software-properties (0.99.22.3) ...
Removing update-notifier-common (3.192.54) ...
Removing update-manager-core (1:22.04.9) ...
dpkg: warning: while removing update-manager-core, directory '/var/lib/update-manager' not empty so not removed
Removing ubuntu-release-upgrader-core (1:22.04.14) ...
Removing ubuntu-minimal (1.481) ...
Removing netplan.io (0.104-0ubuntu2.1) ...
dpkg: warning: while removing netplan.io, directory '/usr/share/netplan/netplan/cli/commands' not empty so not removed
dpkg: warning: while removing netplan.io, directory '/etc/netplan' not empty so not removed
Removing networkd-dispatcher (2.1-2ubuntu0.22.04.2) ...
Removing open-vm-tools (2:11.3.5-1ubuntu4.1) ...
Removing pastebinit (1.5.1-1ubuntu1) ...
Removing plymouth-theme-ubuntu-text (0.9.5+git20211018-1ubuntu3) ...
update-initramfs: deferring update (trigger activated)
Removing python3-certbot (1.21.0-1build1) ...
Removing python3-acme (1.21.0-1) ...
Removing python3-apport (2.20.11-0ubuntu82.1) ...
Removing ubuntu-advantage-tools (27.10.1~22.04.1) ...
Removing python3-twisted (22.1.0-2ubuntu2.3) ...
Removing python3-automat (20.2.0-1) ...
Removing python3-jinja2 (3.0.3-1) ...
Removing python3-babel (2.8.0+dfsg.1-7) ...
Removing python3-bcrypt (3.2.0-1build1) ...
Removing python3-launchpadlib (1.10.16-1) ...
Removing python3-lazr.restfulclient (0.14.4-1) ...
Removing python3-oauthlib (3.2.0-1) ...
Removing python3-blinker (1.4+dfsg1-0.4) ...
Removing python3-requests-toolbelt (0.9.1-1) ...
Removing python3-requests (2.25.1+dfsg-2) ...
Removing python3-certifi (2020.6.20-1) ...
Removing python3-josepy (1.10.0-1) ...
Removing python3-service-identity (18.1.0-6) ...
Removing python3-debian (0.1.43ubuntu1) ...
Removing python3-chardet (4.0.0-1) ...
Removing python3-click (8.0.3-1) ...
Removing python3-colorama (0.4.4-1) ...
Removing python3-commandnotfound (22.04.0) ...
Removing python3-configargparse (1.5.3-1) ...
Removing python3-configobj (5.0.6-5) ...
Removing python3-constantly (15.1.0-2) ...
Removing python3-debconf (1.5.79ubuntu1) ...
Removing ssh-import-id (5.11-0ubuntu1) ...
Removing python3-distro (1.7.0-1) ...
Removing python3-gi (3.42.1-0ubuntu1) ...
Removing python3-gpg (1.16.0-1.2ubuntu4) ...
Removing python3-hamcrest (2.0.2-2) ...
Removing python3-httplib2 (0.20.2-2) ...
Removing python3-hyperlink (21.0.0-3) ...
Removing python3-icu (2.8.1-0ubuntu2) ...
Removing python3-idna (3.3-1) ...
Removing python3-keyring (23.5.0-1) ...
Removing python3-wadllib (1.3.6-1) ...
Removing python3-lazr.uri (1.0.6-2) ...
Removing python3-incremental (21.3.0-1) ...
Removing python3-secretstorage (3.3.1-1) ...
Removing python3-jeepney (0.7.1-3) ...
Removing python3-jsonpatch (1.32-2) ...
Removing python3-json-pointer (2.0-0ubuntu1) ...
Removing python3-jsonschema (3.2.0-0ubuntu2) ...
Removing python3-jwt (2.3.0-1ubuntu0.2) ...
Removing python3-markupsafe (2.0.1-2build1) ...
Removing python3-netifaces:amd64 (0.11.0-1build2) ...
Removing python3-newt:amd64 (0.52.21-5ubuntu2) ...
Removing python3-openssl (21.0.0-1) ...
Removing python3-parsedatetime (2.6-2) ...
Removing sosreport (4.3-1ubuntu2) ...
Removing python3-pexpect (4.8.0-2ubuntu1) ...
Removing python3-zope.component (4.3.0-3) ...
Removing python3-zope.hookable (5.1.0-1build1) ...
Removing python3-zope.event (4.4-3) ...
Removing python3-problem-report (2.20.11-0ubuntu82.1) ...
Removing python3-ptyprocess (0.7.0-3) ...
Removing python3-pyasn1-modules (0.2.1-1) ...
Removing python3-pyasn1 (0.4.8-1) ...
Removing python3-pyparsing (2.4.7-1) ...
Removing python3-pyrsistent:amd64 (0.18.1-1build1) ...
Removing python3-rfc3339 (1.1-3) ...
Removing samba-common-bin (2:4.15.9+dfsg-0ubuntu0.2) ...
Removing python3-samba (2:4.15.9+dfsg-0ubuntu0.2) ...
Removing python3-serial (3.5-1) ...
Removing python3-setuptools (59.6.0-1.2) ...
Removing python3-urllib3 (1.26.5-1~exp1) ...
Removing python3-six (1.16.0-3ubuntu1) ...
Removing python3-systemd (234-3ubuntu2) ...
Removing python3-tdb (1.4.5-2build1) ...
Removing python3-tz (2022.1-1) ...
Removing python3-zope.interface (5.4.0-1build1) ...
Removing ufw (0.36.1-4build1) ...
Skip stopping firewall: ufw (not enabled)
Removing xfsprogs (5.13.0-1ubuntu2) ...
Removing python3-attr (21.2.0-1) ...
Removing python3-cryptography (3.4.8-1ubuntu2) ...
Removing python3-cffi-backend:amd64 (1.15.0-1build2) ...
Removing python3-importlib-metadata (4.6.4-1) ...
Removing python3-zipp (1.0.0-3) ...
Removing python3-more-itertools (8.10.0-2) ...
Removing python3-pkg-resources (59.6.0-1.2) ...
Removing python3-distupgrade (1:22.04.14) ...
Removing python3-update-manager (1:22.04.9) ...
Removing python3-apt (2.3.0ubuntu2.1) ...
Removing python3-dbus (1.2.18-3build1) ...
Removing python3-distro-info (1.1build1) ...
Removing python3-yaml (5.4.1-1ubuntu1) ...
Removing lsb-release (11.1.0ubuntu4) ...
(Reading database ... ^M(Reading database ... 5%^M(Reading database ... 10%^M(Reading database ... 15%^M(Reading database ... 20%^M(Reading database ... 25%^M(Reading database ... 30%^M(Reading database ... 35%^M(Reading database ... 40%^M(Reading database ... 45%^M(Reading database ... 50%^M(Reading database ... 55%^M(Reading database ... 60%^M(Reading database ... 65%^M(Reading database ... 70%^M(Reading database ... 75%^M(Reading database ... 80%^M(Reading database ... 85%^M(Reading database ... 90%^M(Reading database ... 95%^M(Reading database ... 100%^M(Reading database ... 33066 files and directories currently installed.)
Preparing to unpack .../libpcre2-8-0_10.39-3ubuntu0.1_amd64.deb ...
Unpacking libpcre2-8-0:amd64 (10.39-3ubuntu0.1) over (10.39-3build1) ...
Setting up libpcre2-8-0:amd64 (10.39-3ubuntu0.1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for dbus (1.12.20-2ubuntu4) ...
Processing triggers for install-info (6.8-4build1) ...
Processing triggers for initramfs-tools (0.140ubuntu13) ...
Log ended: 2022-09-22 13:04:16

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

What was the command that produced this output?

What is the output of the commands

uname -a
lsb_release -crid

Revision history for this message
Stephen Bush (steve-bush) said :
#4

1. The command that caused this log
apt-get update
apt-get -y -o Dpkg::Options::="--force-confold" -o Dpkg::Options::="--force-confdef" dist-upgrade
apt-get clean
apt-get -y autoremove

2.
13:48:09 root@www:~# uname -a
Linux www 5.15.0-48-generic #54-Ubuntu SMP Fri Aug 26 13:26:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

13:49:13 root@www:~# lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

If this is a server with some significance, then I would avoid the apt autoremove command. What do you expect to gain from it, except a few MB of space recovered, with the risk of issues like the one you describe here? I recommend doing package removals only manually and under supervision, not automated.

For further diagnostics the contents of /var/log/apt/history.log around the time when this happened could be helpful.

Can you help with this problem?

Provide an answer of your own, or ask Stephen Bush for more information if necessary.

To post a message you must log in.