I added Bazel distribution URI as a package source using the following instructions from their website:
$ echo "deb [arch=amd64] stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
$ curl | sudo apt-key add -
$ sudo apt-get update && sudo apt-get install bazel
$ sudo apt-get upgrade bazelInstallation went fine, but I keep getting these annoying messages from apt-get whenever I update or install a new package:
N: Ignoring file 'bazel.lis' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extensionSo I decided to uninstall bazel and install it through the ubuntu installer, however this did not get rid of the apt-get message since the distribution URI is still in the list although the package is uninstalled.
How can I remove it from the list? From the question How can PPAs be removed? it seems like the following might work, but before doing it I wanted to make sure I'm not removing ppas for other packages.
sudo add-apt-repository --remove ppa:Could you let me know if I'm on the right track? Thanks!
1 Answer
It looks like you mistyped the tee command when you originally did it - the filename is wrong. APT is complaining because the files in sources.list.d must have the extension .list and yours has .lis
You can delete the file:
sudo rm /etc/apt/sources.list.d/bazel.lisThe errors will go away :)
The add-apt-repository --remove command would work (delete the file for you), if add-apt-repository could match the description ppa: to a file, but that will not work here, I believe, since the filename is not valid. Rather than using echo and tee, you may want to use add-apt-repository to add ppas, as it will just error out if you make a typo (unless you unluckily type the real name of a ppa that is not the ppa you really want!) rather than giving you a broken file.