Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
How do I fix this “E:Type ‘*’ is not known on line * in source list …” update error?

I type sudo sh -c 'echo "[some repository]" >> /etc/apt/sources.list, but, then I get this message:

bash: /etc/apt/sources.list: Permission denied` 

And it doesn't work.

And now, when I type sudo apt-get update or open the Update Manager, the system just shows me the error message:

E: Type '[some repository]' is not known on line 62 in source list /etc/apt/sources.list 
E: The list of sources could not be read.**


could not initialize the package information

How can I fix this?

share|improve this question

marked as duplicate by Eliah Kagan, Tom Brossman, Chris Wilson, fossfreedom Jan 31 '13 at 13:12

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Your problem is not bad so do not worry, simply do the following:

  1. Remove the file sources.list
    sudo rm -fr /etc/apt/sources.list

  2. Run the update process. It will create the file again
    sudo apt-get update

Now, if you really want to know what is wrong or why it happened then do the following:

sudo nano +62 /etc/apt/sources.list

This will take you to the line with the problem and should give you an idea of why it is failing if compared to other lines. In most cases like this, I simply delete the file and then update to recreate it. Saves me time. But if I want to know what really happened, I do the last line first.

share|improve this answer
Thank you!!! the problem is fixed!!! – 詠政 黃 Jan 30 '13 at 7:48

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