0

I put a file into my sources.list.d dir and is not formated correctly. I get an error about malformed line in source list '/etc/apt/source.list.d/precise-R.list' (dit parse). I forgot to put the #deb ... line. I tried to remove but I am denied permission. How do I get rid of that file?

I am new to Ubuntu precise and trying to put a deb file into sources.list.d dir but do not know how. At terminal I used:

sudo cp /home/steve/Steve1/precise-R.list /etc/apt/sources.list.d/precise-R.list 

And got the file in to the dir and now I cannot get out. Anytime I try other method to put this file into sources.list.d and save I am denied -- I do not have permission. How do I set the permission so I can make deb files correctly next time?

Zanna
  • 69,223
  • 56
  • 216
  • 327
  • 1
    possible duplicate of [How do I remove a malformed line from my sources.list?](http://askubuntu.com/questions/78951/how-do-i-remove-a-malformed-line-from-my-sources-list) – A.B. Jul 06 '15 at 17:22
  • Use `sudo vim /etc/apt/source.list.d/precise-R.list`, then `insert` for start typing, `:wq` for save and quit, or `:q!` quit without saving. – jangorecki Mar 20 '16 at 21:42

1 Answers1

1

You need to use sudo - use the command sudo before the command you want to execute to run it with administrator privileges.

To remove the malformed line in precise-R.list enter the following command into the terminal:

sudo -H gedit /etc/apt/source.list.d/precise-R.list

To remove the file:

sudo rm /etc/apt/source.list.d/precise-R.list
Zanna
  • 69,223
  • 56
  • 216
  • 327
TellMeWhy
  • 17,124
  • 39
  • 95
  • 141