how to delete from Terminal

Asked by Neil

Hi I am trying to delete something from terminal.

I was give this command cat /etc/apt/sources.list
I was them told to delete these file as they should not be in the list

echo 'deb-src http://ppa.launchpad.net/reacocard-awn/ubuntu hardy main'
sudo tee -a /etc/apt/sources.list

sudo apt-get update

sudo tee -a /etc/apt/sources.list

But I don't know how to do it, can someone please tell me how.

Thank you
Neil

ps here is the original request for help, just in case you need more info.
https://answers.launchpad.net/ubuntu/+question/47952

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Bhavani Shankar
Solved:
Last query:
Last reply:
Revision history for this message
Tony Mugan (tmugan) said :
#1

In a terminal window (applications menu, accessories) type the following

sudo gedit /etc/apt/sources.list

And then you can edit the file and save it back to disk.

This is the file which determines where you get your software updates from so be careful with the editing.
You can place a # symbol at the start of the line to remove that line from being included when searching for software (Synaptic) or updates (Update Manager).

Revision history for this message
Martin Kaufmann (martin.kaufmann) said :
#2

you can also try another Editor in the terminal , i usually take nano (defaulteditor)

sudo nano /etc/apt/sources.list

but you can also do this comfortably like Tony said in X-Session

Revision history for this message
Best Bhavani Shankar (bhavi) said :
#3

Hello Neil

To edit the sources.list file, press ALT+F2 at the Ubuntu desktop and then type the following command in the box, depending on your Ubuntu flavour:
For Ubuntu:
gksudo gedit /etc/apt/sources.list
For Kubuntu:
kdesudo kwrite /etc/apt/sources.list
Exactly as you see it there, then press enter/return. Enter your password when prompted and edit the file in the editor as advised above.

Then delete/remove these lines

echo 'deb-src http://ppa.launchpad.net/reacocard-awn/ubuntu hardy main'
sudo tee -a /etc/apt/sources.list

sudo apt-get update

sudo tee -a /etc/apt/sources.list

You should then save and quit the editor.

Then do

sudo apt-get update

The program which reads /etc/apt/sources.list should work again.

Regards

Revision history for this message
Neil (goofandfroggie) said :
#4

Thanks Bhavani Shankar, that solved my question.