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

The traceback I'm getting makes me believe I have to reset all my repositories on my Ubuntu 12.04 installation. How do I do that?

Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 183, in <module>
    if not sp.add_source_from_line(line):
  File "/usr/lib/python2.7/dist-packages/softwareproperties/", line 718, in add_source_from_line
  File "/usr/lib/python2.7/dist-packages/softwareproperties/", line 471, in set_modified_sourceslist
  File "/usr/lib/python2.7/dist-packages/softwareproperties/", line 635, in save_sourceslist
  File "/usr/lib/python2.7/dist-packages/aptsources/", line 396, in save
    files[source.file] = open(source.file, "w")
IOError: [Errno 2] No such file or directory: '/etc/apt/sources.list.d//noobslab-themes-precise.list'
share|improve this question
possible duplicate of How to remove wrong command ran earlier? – Rinzwind Jan 1 '13 at 19:56
What command were you running? What did you do before to break it? Be more specific on what you want "to reset"? Do you want to disable all non-official repositories you've enabled earlier, do you want to re-download all indexes of them, or do you want to revert all packages installed from non-official repositories? – gertvdijk Jan 1 '13 at 22:11
I want to redownload all of the indexes again – Peter Wagg Jan 3 '13 at 1:48

Did you add a PPA containing a dash(-) in its name?

If so, seems like you've hit

What's the output of running sudo apt-get update ?

share|improve this answer
Reading package lists... Done – Peter Wagg Jan 1 '13 at 20:07
comment rather than and answer – Ringtail Jan 1 '13 at 20:15
Reading the bug report details in the comments I think the OP should see other symptoms than this Python IOError. – gertvdijk Jan 1 '13 at 20:46

Your Answer


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.