0

I run the following commands accidentally :

rm -R /etc/apt

rm -R /var/lib

Or could anyone tell me what are the main repository of Ubuntu

I am using Ubuntu 16.04 LTS

4
  • 3
    With a system that gutted, you're probably best off backing up any important data that are left and reinstalling the system. – DopeGhoti Jun 17 '16 at 6:11
  • 4
    "accidently"? I call that "on purpose". Backup your data through a live session and re-install. – Rinzwind Jun 17 '16 at 6:13
  • What about I copy this file and directory from another Pc with the same system . ? Is it going work ? – helio2f Jun 17 '16 at 6:17
  • 1
    It might. I would though still suggest to backup your data and re-install. – Rinzwind Jun 17 '16 at 6:24
0

Or could anyone tell me what are the main repository of Ubuntu

create your own "main" repository list here: Ubuntu Sources List Generator

  1. Select your Country from the drop down list.
  2. Select your Version/Release from the drop down list.
  3. Select the Branches you want by clicking on their check boxes. I suggest not to select the various Sources Repositories unless you know you need them.
  4. Select the Updates you want by clicking on their check boxes. I suggest just choosing Important Security Updates and Recommended Updates
  5. Scroll to the bottom of the page and click on the Generate List button.

The resulting page will give you a list of repositories based on your previous selections.

3
  • You might be able to improve this answer with providing the steps needed in more detail how to replace the files he deleted and maybe even adding screen-shots of different parts to make it a rock solid answer. – Videonauth Jun 17 '16 at 6:32
  • And that also restores the pgp keys? and how about "/var/lib/"? – Rinzwind Jun 17 '16 at 7:09
  • And that also restores the pgp keys? and how about "/var/lib/"? No, but it will give a list of Ubuntu repositories which answers the OR part of the question – smokinmoe Jul 17 '18 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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