While installing python-pip I accidentally edited sources.list file and it's corrupted my entire pc. Please help me! I want to factory reset Ubuntu but nothing on the internet is helping me here. All the terminal commands related to apt are returning an error that "cdrom/d " (the line I edited) is not known in sources.list Can someone please please help me out here. Never used Ubuntu in my life and my first experience was this -_-
You can reinstall the entire OS, that'll get your file back. That's a big thing to do though.
You could also use a 3rd party service like SimplyLinux's RepoGen, but that's a 3rd party tool, so your mileage may vary here.
If that scares you, you could always try
$ sudo apt edit-sources and comment out the offending line(s) in your sources file.
A third option (a risky one!) would be to reinstall apt:
$ sudo apt-get --reinstall install apt
Hope this helps!