I accidentally removed my /etc/apt/sources.list
file. Is it hosted by Canonical somewhere so I can re-add it to the system? It's a bit of an emergency, so I hope someone can provide a quick answer.
Software Sources – How to Restore the sources.list File
software-sources
Best Answer
You can boot into a Live CD (a virtual machine will suffice) and copy
/etc/apt/sources.list
from it. Alternatively, have a Live CD image ready and follow these instructions:Mount the CD. If you've an
.iso
file, mount it using:Mount the filesystem file from the CD:
Copy the sources.list file over:
Change the file permissions if necessary:
From my Ubuntu 11.04 Live CD:
For the best download speed, you need to re-select a mirror near you:
You might want to enable some repositories as well, like Community-maintained Open Source software (universe) and Software restricted by copyright and legal issues (multiverse)