0

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.

1

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.

|improve this answer|||||

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.