3

I added Bazel distribution URI as a package source using the following instructions from their website:

$ echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
$ curl https://storage.googleapis.com/bazel-apt/doc/apt-key.pub.gpg | sudo apt-key add -
$ sudo apt-get update && sudo apt-get install bazel
$ sudo apt-get upgrade bazel

Installation 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 extension

So 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:http://storage.googleapis.com/bazel-apt

Could you let me know if I'm on the right track? Thanks!

1 Answer 1

4

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.lis

The 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:http://storage.googleapis.com/bazel-apt 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.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.