How can /etc/apt/sources.list.d object be removed?
Solution 1
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
Solution 2
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.
Related videos on Youtube
MikiBelavista
Updated on September 18, 2022Comments
-
MikiBelavista over 1 year
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?
-
MikiBelavista over 6 yearsI have installed with snap, but now I got cassandra -v cassandra: command not found Why?