0

I accidentally deleted the directory '/etc/apt/sources.list.d'. How can I solve?

1
  • As a sidenote: Don't use 16.10. It's end of life. Upgrade to 18.04 or 18.10.
    – vidarlo
    Jan 3, 2019 at 19:57

2 Answers 2

3

/etc/apt/sources.list.d is owned by root, and has the permissions rwxr-xr-x

You can recreate it with

sudo mkdir /etc/apt/sources.list.d
sudo chmod 755 /etc/apt/sources.list.d

You will of course have to manually add all sources you want after having recreated the directory.

0

Please, try this command to recreate your repository:

sudo add-apt-repository ppa:webupd8team/java
sudo apt update
2
  • Thanks for the reply but I have deleted the directory /etc/apt/sources.list.d by mistake. Now running the command sudo add-apt-repository command ppa: webupd8team / java and i have this error 'can not find the folder'
    – andrea5
    Jan 3, 2019 at 19:36
  • Try this: mkdir /etc/apt/sources.list.d Jan 3, 2019 at 20:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .