Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Every once in a while I see users having issues to update due to errors like this:

E:Type 'ain' is not known on line 1 in source list /etc/apt/sources.list.d/some-ppa.list'

with varying types/line numbers/source list files (often after removing a PPA).

How can such an error be fixed?

share|improve this question
add comment

3 Answers

up vote 18 down vote accepted

The error indicates a malformed entry in a source file, which causes the update process to abort. To fix it, you have to either fix the entry (if you know what the right entry should look like) or remove it altogether (that's what I'm going to describe, as it's the fastest way to enable you to update your system again).

  1. First, you need to open the file containing the bad entry. The filename is given in the error message, in your example /etc/apt/sources.list.d/some-ppa.list. Press Alt + F2, and type

    gksu gedit /etc/apt/sources.list.d/some-ppa.list
    

    and press Enter. After entering your password, you should now see the file opened in the text editor gedit.

  2. Now you need to locate the malformed entry. It should be on the line number given in the error message - in your case that would be line 1.

  3. This line should be incomplete and start with the unknown type the update process is complaining about (here ain). Just delete the whole line, save the file, and close the editor*.

  4. That's it. You should now be able to successfully run the update process!


*) If that entry is all that's in the file, then you can just delete the file.

  • Press Alt + F2,
  • Type gnome-terminal and press Enter to start a GNOME terminal,
  • Type sudo rm /etc/apt/sources.list.d/some-ppa.list (password required), and
  • You are done! :-)
share|improve this answer
add comment

You're experiencing Bug #789859 in the software-properties package.

The quick and immediate fix is to open up the file that the error message mentions (in this case '/etc/apt/sources.list.d/the-board-team-dev-snapshots-natty.list') and remove the line that says "ain". This is achieved like so:

  1. Press Alt+F2
  2. Enter: gksudo gedit /etc/apt/sources.list.d/the-board-team-dev-snapshots-natty.list
  3. Remove the line that says "ain"
  4. Save the file

When done, everything should work.

To avoid experiencing this bug in the future, please visit the bug's Launchpad page and mark the bug as affecting you:

https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/789859

share|improve this answer
add comment

To completely remove any unwanted ppa we may use the script ppa-purge Install ppa-purge that will remove the ppa and restores Ubuntu default settings for any applications that may have been installed by this ppa.

In your case try if

sudo ppa-purge -purge the-board-team/dev-snapshots

followed by

sudo apt-get update

helps you to get rid of your synaptic error.

share|improve this answer
    
TY ur Awesome!!!! –  Jonthue Michel Apr 30 '11 at 12:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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