Saturday, June 2, 2018

How to fix W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list

How to fix W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list

This morning, i decided to upgrade my laptop which runs on lubuntu 17.10 to the new lubuntu 18.04 bionic, but when i run apt-get update command, this error appear in the command line:

The error message is like this:
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:53 and /etc/apt/sources.list:55
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:53 and /etc/apt/sources.list:55
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:53 and /etc/apt/sources.list:55
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:53 and /etc/apt/sources.list:55
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:53 and /etc/apt/sources.list:55
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:53 and /etc/apt/sources.list:55
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:53 and /etc/apt/sources.list:55
W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:53 and /etc/apt/sources.list:55
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:53 and /etc/apt/sources.list:55
This problem happened because there are two or more duplicate entries in the source.list file, the error message indicates that line 53 and 55 is duplicate.

To fix this, i need to open source.list which located in /etc/apt/sources.list, i can use leafpad to open this file and show the line numbers so that it's easier for me to locate line 53 and 55.

sudo leafpad /etc/apt/sources/list

To show line numbers on leafpad, simply click menu Options > Line Numbers. And indeed line 53 and 55 shows the same thing, so the solution is removing one of them, hit save and try again.



1 comment:

  1. This comment has been removed by a blog administrator.

    ReplyDelete