Errors and many configured multiple times in sudo apt-get update for Ubuntu 16.04

Asked by michael

This is what I get from sudo apt-get update.

michael@16:~$ sudo apt-get update
[sudo] password for michael:
Hit:1 http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu xenial InRelease
Hit:2 http://ppa.launchpad.net/nowrep/qupzilla/ubuntu xenial InRelease
Hit:3 https://deb.opera.com/opera-stable stable InRelease
Hit:4 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Get:5 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 DEP-11 Metadata [303 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu xenial-updates/main DEP-11 64x64 Icons [184 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 DEP-11 Metadata [121 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe DEP-11 64x64 Icons [145 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 DEP-11 Metadata [2,520 B]
Hit:11 http://archive.canonical.com/ubuntu xenial InRelease
Get:12 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Get:13 http://security.ubuntu.com/ubuntu xenial-security/main amd64 DEP-11 Metadata [68.1 kB]
Get:14 http://security.ubuntu.com/ubuntu xenial-security/main DEP-11 64x64 Icons [43.0 kB]
Get:15 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 DEP-11 Metadata [19.4 kB]
Get:16 http://security.ubuntu.com/ubuntu xenial-security/universe DEP-11 64x64 Icons [25.6 kB]
Get:17 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 DEP-11 Metadata [212 B]
Fetched 1,115 kB in 12min 1s (1,545 B/s)
AppStream cache update completed, but some metadata was ignored due to errors.
Reading package lists... Done
N: Ignoring file '20auto-upgrades.ucf-dist' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension
W: Target Packages (partner/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:43 and /etc/apt/sources.list.d/xenial-partner.list:4
W: Target Packages (partner/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:43 and /etc/apt/sources.list.d/xenial-partner.list:4
W: Target Packages (partner/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:43 and /etc/apt/sources.list.d/xenial-partner.list:4
W: Target Translations (partner/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:43 and /etc/apt/sources.list.d/xenial-partner.list:4
W: Target Translations (partner/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:43 and /etc/apt/sources.list.d/xenial-partner.list:4
W: Target DEP-11 (partner/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:43 and /etc/apt/sources.list.d/xenial-partner.list:4
W: Target DEP-11-icons (partner/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:43 and /etc/apt/sources.list.d/xenial-partner.list:4
W: Target Packages (partner/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:43 and /etc/apt/sources.list.d/xenial-partner.list:4
W: Target Packages (partner/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:43 and /etc/apt/sources.list.d/xenial-partner.list:4
W: Target Packages (partner/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:43 and /etc/apt/sources.list.d/xenial-partner.list:4
W: Target Translations (partner/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:43 and /etc/apt/sources.list.d/xenial-partner.list:4
W: Target Translations (partner/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:43 and /etc/apt/sources.list.d/xenial-partner.list:4
W: Target DEP-11 (partner/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:43 and /etc/apt/sources.list.d/xenial-partner.list:4
W: Target DEP-11-icons (partner/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:43 and /etc/apt/sources.list.d/xenial-partner.list:4
michael@16:~$

I expect to have more numbered lines than 17.
Been trying to remove the line N: Ignoring file '20auto-upgrades.ucf-dist' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension
I read that, must unmount before removing. Unmounted and started to remove. Stopped at when warning statement, you may damage this because file is mounted. Could not figure out how to remove the configured multiple times.
Getting older, and have noticed that, I sometimes can't see the forest for the trees. Any help appreciated. Also another problem, very slow about certain actions, as in above line. Fetched 1,115 kB in 12min 1s (1,545 B/s) Don't know if related. I am working on it as different problem.

Question information

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

What is the output of:

sudo rm /etc/apt/apt.conf.d/20auto-upgrades.ucf-dist
sudo grep -i -R partner /etc/apt/*

Thanks

Revision history for this message
michael (yellupcm-gmail) said :
#2

michael@16:~$ sudo rm /etc/apt/apt.conf.d/20auto-upgrades.ucf-dist
[sudo] password for michael:
michael@16:~$ sudo grep -i -R partner /etc/apt/*
/etc/apt/sources.list:## 'partner' repository.
/etc/apt/sources.list:deb http://archive.canonical.com/ubuntu xenial partner
/etc/apt/sources.list:deb-src http://archive.canonical.com/ubuntu xenial partner
/etc/apt/sources.list.d/xenial-partner.list:# channel for the xenial (16.04) partner channel
/etc/apt/sources.list.d/xenial-partner.list:#:description:This channel contains the partner software for xenial
/etc/apt/sources.list.d/xenial-partner.list:deb http://archive.canonical.com/ubuntu xenial partner
/etc/apt/sources.list.save:## 'partner' repository.
/etc/apt/sources.list.save:deb http://archive.canonical.com/ubuntu xenial partner
/etc/apt/sources.list.save:deb-src http://archive.canonical.com/ubuntu xenial partner
michael@16:~$

michael@16:~$ sudo rm /etc/apt/apt.conf.d/20auto-upgrades.ucf-dist
rm: cannot remove '/etc/apt/apt.conf.d/20auto-upgrades.ucf-dist': No such file or directory
michael@16:~$ sudo grep -i -R partner /etc/apt/*
/etc/apt/sources.list:## 'partner' repository.
/etc/apt/sources.list:deb http://archive.canonical.com/ubuntu xenial partner
/etc/apt/sources.list:deb-src http://archive.canonical.com/ubuntu xenial partner
/etc/apt/sources.list.d/xenial-partner.list:# channel for the xenial (16.04) partner channel
/etc/apt/sources.list.d/xenial-partner.list:#:description:This channel contains the partner software for xenial
/etc/apt/sources.list.d/xenial-partner.list:deb http://archive.canonical.com/ubuntu xenial partner
/etc/apt/sources.list.save:## 'partner' repository.
/etc/apt/sources.list.save:deb http://archive.canonical.com/ubuntu xenial partner
/etc/apt/sources.list.save:deb-src http://archive.canonical.com/ubuntu xenial partner
michael@16:~$

 I pasted command separately, no output between line three and four above.
Then together at space above.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

sudo rm /etc/apt/sources.list.d/xenial-partner.list
sudo rm /etc/apt/sources.list.save
sudo apt-get update

Is it OK now?

Revision history for this message
michael (yellupcm-gmail) said :
#4

michael@16:~$ sudo rm /etc/apt/sources.list.d/xenial-partner.list
[sudo] password for michael:
michael@16:~$ sudo rm /etc/apt/sources.list.save
michael@16:~$ sudo apt-get update
Hit:1 http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu xenial InRelease
Hit:2 http://ppa.launchpad.net/nowrep/qupzilla/ubuntu xenial InRelease
Hit:3 https://deb.opera.com/opera-stable stable InRelease
Hit:4 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Get:5 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [445 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages [438 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 DEP-11 Metadata [302 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu xenial-updates/main DEP-11 64x64 Icons [183 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 DEP-11 Metadata [121 kB]
Get:11 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe DEP-11 64x64 Icons [145 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 DEP-11 Metadata [2,520 B]
Hit:13 http://archive.canonical.com/ubuntu xenial InRelease
Get:14 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Get:15 http://security.ubuntu.com/ubuntu xenial-security/main amd64 DEP-11 Metadata [68.2 kB]
Get:16 http://security.ubuntu.com/ubuntu xenial-security/main DEP-11 64x64 Icons [41.3 kB]
Get:17 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 DEP-11 Metadata [19.4 kB]
Get:18 http://security.ubuntu.com/ubuntu xenial-security/universe DEP-11 64x64 Icons [25.6 kB]
Get:19 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 DEP-11 Metadata [212 B]
Fetched 1,996 kB in 12min 1s (2,766 B/s)
AppStream cache update completed, but some metadata was ignored due to errors.
Reading package lists... Done
michael@16:~$

That answered my question. Will look for metadata errors.
Can you give information on what you did, and how you knew to do it?

Revision history for this message
michael (yellupcm-gmail) said :
#5

Question solved.

Revision history for this message
michael (yellupcm-gmail) said :
#6

Actionparsnip solved, not me!

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#7

The output was saying there were duplicate sources in your system. Each source should only be referred to once, either in the main sources.list file or in files in /etc/apt/sources.list.d

We removed the files as they contained the duplicate entries and the system is now happy. Have a reread and you will see what I mean

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

Remark: the "appstream metadata errors" message is a known issue, see Bug #1644498

There is nothing you need to do, you can safely ignore it.

Revision history for this message
michael (yellupcm-gmail) said :
#9

Thanks Actionparsnip

Thanks Manfred Hampl