3

I have added

echo "deb http://www.apache.org/dist/cassandra/debian 311x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list

Now I want to remove it and install Cassandra in another way.How to delete it?

muru
  • 193,181
  • 53
  • 473
  • 722
MikiBelavista
  • 1,193
  • 5
  • 22
  • 33

2 Answers2

6

Open /etc/apt/sources.list.d/cassandra.sources.list for editing in nano text editor and comment out the line that you want to disable by preceding it with a # character at the beginning of the line.

sudo nano /etc/apt/sources.list.d/cassandra.sources.list  

Change this line:

deb http://www.apache.org/dist/cassandra/debian 311x main  

So that it looks like this:

# deb http://www.apache.org/dist/cassandra/debian 311x main  

Nano editor keyboard shortcuts
Use the keyboard combination Ctrl + O and after that press Enter to save the file to its current location.
Use the keyboard combination Ctrl + X to exit nano.

Update the list of available software:

sudo apt update     
karel
  • 110,292
  • 102
  • 269
  • 299
1

The easiest way is sudo rm /etc/apt/sources.list.d/cassandra.sources.list .. this will remove all entries that's in the casandra.sources.list file, but it should only be the one you added.

Soren A
  • 6,442
  • 2
  • 17
  • 33