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.

I want to completely clean my Ubuntu's apt-get database to be just like the installation moment. When I run sudo apt-get update it has too many sources.

I want to delete them and recreate the database with the apt-get upgrade command.

share|improve this question

1 Answer 1

In order to do this there is a pretty handy webapp available called the “Ubuntu Sources List Generator”. Click here please http://repogen.simplylinux.ch/

By moving through each section it enables you to select your country, release and then check each repository you want to add, not only does it support all the official ones for things like security and updates, it also allows for 3rd party repos such as Banshee, Chromium, Conky and VLC amongst a bunch others. Once you have what you want hit generate and it’ll create a nice, comment, new sources.list file ready for you to replace your old one with.

You may want to backup your old sources.list just in case with the following command:

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bkup

Once you have that you can open the sources.list and simply paste the new one in from the repogen:

sudo gedit /etc/apt/sources.list

Paste, Save and Close the file and now you should paste the generated GPG keys, found just below the generated sources.list file, into your terminal.

Everything should be back to default and allow you to once again update everything.

source and more info

share|improve this answer

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.