Comment 4 for bug 1982051

Revision history for this message
Luo Lei (luolei) wrote (last edit ):

The issue seems to occur when copying the "/etc/apt/apt.conf.d/10periodic" file using the "cp" command, for reasons unknown. There are no issues found with the filesystem when checked with "fsck", and the "rsync" command works fine.

Temporary solution:
(1) Locate the problematic deb package: "/var/cache/apt/archives/update-notifier-common_3.192.1.21_all.deb"
(2) After extracting, delete the "10periodic" file and the line corresponding to "10periodic" in "conffiles".
(3) Organize the files according to the deb package format, then repackage:
    sudo dpkg -b update-notifier-common_3.192.1.21_all update-notifier-common_3.192.1.21_all.deb
(4) Install the new package with "--force-overwrite", and fix the broken apt.
    sudo cp update-notifier-common_3.192.1.21_all.deb /var/cache/apt/archives
    cd /var/cache/apt/archives
    sudo dpkg -i --force-overwrite update-notifier-common_3.192.1.21_all.deb
    sudo apt install -f

The attached deb package is created using the above method, for Ubuntu 18.04.