P/S: Before you mark or vote this question as duplicate, I wanted to post my answer here (How can I fix apt error “W: Target Packages … is configured multiple times”?), but the question has been protected, which made me to resort to asking a new question and answering it.

I just installed a new copy of Linux OS (Ubuntu 18.04) on my local machine, and I am currently installing new applications.

I have successfully installed some applications, however after installing Opera Browser, I seem to run into an error.

Each time I run the command

sudo apt update

in my terminal, I get the error

W: Target Packages (non-free/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:51 and /etc/apt/sources.list.d/opera-stable.list:4

displayed multiple times.

I have tried to make some research on how to solve this, but there seems to be no solution yet. I need some assistance.


The issue was caused as a result of unknowingly adding Opera Stable apt-repository to the sources list.

Here's how I fixed it

Solution 1

Open your terminal or command line, and type the following

sudo nano /etc/apt/sources.list

This will open your sources list in the nano editor

Simply scroll down the list and comment out the line that is causing the issue.

For me it was the opera stable apt-repository line

deb [arch=amd64,i386] https://deb.opera.com/opera-stable/ stable non-free

All I had to do was to comment it out, like this

# deb [arch=amd64,i386] https://deb.opera.com/opera-stable/ stable non-free

Then exit the file, by pressing

Ctrl + X

And then Press Y on your keyboard to save the changes.

Solution 2

  1. Open the Software and Updates application
  2. Click on the Other Software tab
  3. Scroll down and click on Opera Browser (final releases) stable
  4. Click the Remove button at the bottom
  5. After the removal, click the Refresh button to update your cache

Screenshot of the solution

That's all.

I hope this helps.


You can find the the latest package to solve the problem .

  1. Install the prerequisites:

     sudo apt install python3-apt
  2. From the download location of the PYZ bundle run:

     sudo python3 -OEs aptsources-cleanup.pyz
  3. Follow the instructions appearing on the screen.

REFERENCE = https://askubuntu.com/a/762815/1122646

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.