Ended up messing up my /etc/apt folder [duplicate]












0















This question already has an answer here:




  • How do I fix this “E: Type '*' is not known on line * in source list …” update error?

    3 answers



  • How do I remove a malformed line from my sources.list?

    9 answers




While working on an online tutorial I probably messed up my etc/apt/ folder as every time I use apt or apt-get command I get the following error:



E: Type '&&' is not known on line 1 in source list /etc/apt/sources.list.d/kubernetes.list
E: The list of sources could not be read.
E: Type '&&' is not known on line 1 in source list /etc/apt/sources.list.d/kubernetes.list
E: The list of sources could not be read.


Any help please










share|improve this question















marked as duplicate by N0rbert, Eric Carvalho, karel, Kulfy, Fabby Dec 21 '18 at 12:04


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • Please post the output of cat /etc/apt/sources.list.d/kubernetes.list
    – wjandrea
    Dec 20 '18 at 18:44










  • @wjandrea OP mentioned that in first comment. I have deleted my comments otherwise you would be able to recognize them on your own. Not sure from where he pasted that to that list.:)
    – Kulfy
    Dec 20 '18 at 18:55












  • @Kulfy Oh, I see. Muhammad, please edit your post to add details.
    – wjandrea
    Dec 20 '18 at 18:57
















0















This question already has an answer here:




  • How do I fix this “E: Type '*' is not known on line * in source list …” update error?

    3 answers



  • How do I remove a malformed line from my sources.list?

    9 answers




While working on an online tutorial I probably messed up my etc/apt/ folder as every time I use apt or apt-get command I get the following error:



E: Type '&&' is not known on line 1 in source list /etc/apt/sources.list.d/kubernetes.list
E: The list of sources could not be read.
E: Type '&&' is not known on line 1 in source list /etc/apt/sources.list.d/kubernetes.list
E: The list of sources could not be read.


Any help please










share|improve this question















marked as duplicate by N0rbert, Eric Carvalho, karel, Kulfy, Fabby Dec 21 '18 at 12:04


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • Please post the output of cat /etc/apt/sources.list.d/kubernetes.list
    – wjandrea
    Dec 20 '18 at 18:44










  • @wjandrea OP mentioned that in first comment. I have deleted my comments otherwise you would be able to recognize them on your own. Not sure from where he pasted that to that list.:)
    – Kulfy
    Dec 20 '18 at 18:55












  • @Kulfy Oh, I see. Muhammad, please edit your post to add details.
    – wjandrea
    Dec 20 '18 at 18:57














0












0








0








This question already has an answer here:




  • How do I fix this “E: Type '*' is not known on line * in source list …” update error?

    3 answers



  • How do I remove a malformed line from my sources.list?

    9 answers




While working on an online tutorial I probably messed up my etc/apt/ folder as every time I use apt or apt-get command I get the following error:



E: Type '&&' is not known on line 1 in source list /etc/apt/sources.list.d/kubernetes.list
E: The list of sources could not be read.
E: Type '&&' is not known on line 1 in source list /etc/apt/sources.list.d/kubernetes.list
E: The list of sources could not be read.


Any help please










share|improve this question
















This question already has an answer here:




  • How do I fix this “E: Type '*' is not known on line * in source list …” update error?

    3 answers



  • How do I remove a malformed line from my sources.list?

    9 answers




While working on an online tutorial I probably messed up my etc/apt/ folder as every time I use apt or apt-get command I get the following error:



E: Type '&&' is not known on line 1 in source list /etc/apt/sources.list.d/kubernetes.list
E: The list of sources could not be read.
E: Type '&&' is not known on line 1 in source list /etc/apt/sources.list.d/kubernetes.list
E: The list of sources could not be read.


Any help please





This question already has an answer here:




  • How do I fix this “E: Type '*' is not known on line * in source list …” update error?

    3 answers



  • How do I remove a malformed line from my sources.list?

    9 answers








apt package-management






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 20 '18 at 18:13









Kulfy

3,45841039




3,45841039










asked Dec 20 '18 at 7:02









Muhammad Khan

31




31




marked as duplicate by N0rbert, Eric Carvalho, karel, Kulfy, Fabby Dec 21 '18 at 12:04


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by N0rbert, Eric Carvalho, karel, Kulfy, Fabby Dec 21 '18 at 12:04


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • Please post the output of cat /etc/apt/sources.list.d/kubernetes.list
    – wjandrea
    Dec 20 '18 at 18:44










  • @wjandrea OP mentioned that in first comment. I have deleted my comments otherwise you would be able to recognize them on your own. Not sure from where he pasted that to that list.:)
    – Kulfy
    Dec 20 '18 at 18:55












  • @Kulfy Oh, I see. Muhammad, please edit your post to add details.
    – wjandrea
    Dec 20 '18 at 18:57


















  • Please post the output of cat /etc/apt/sources.list.d/kubernetes.list
    – wjandrea
    Dec 20 '18 at 18:44










  • @wjandrea OP mentioned that in first comment. I have deleted my comments otherwise you would be able to recognize them on your own. Not sure from where he pasted that to that list.:)
    – Kulfy
    Dec 20 '18 at 18:55












  • @Kulfy Oh, I see. Muhammad, please edit your post to add details.
    – wjandrea
    Dec 20 '18 at 18:57
















Please post the output of cat /etc/apt/sources.list.d/kubernetes.list
– wjandrea
Dec 20 '18 at 18:44




Please post the output of cat /etc/apt/sources.list.d/kubernetes.list
– wjandrea
Dec 20 '18 at 18:44












@wjandrea OP mentioned that in first comment. I have deleted my comments otherwise you would be able to recognize them on your own. Not sure from where he pasted that to that list.:)
– Kulfy
Dec 20 '18 at 18:55






@wjandrea OP mentioned that in first comment. I have deleted my comments otherwise you would be able to recognize them on your own. Not sure from where he pasted that to that list.:)
– Kulfy
Dec 20 '18 at 18:55














@Kulfy Oh, I see. Muhammad, please edit your post to add details.
– wjandrea
Dec 20 '18 at 18:57




@Kulfy Oh, I see. Muhammad, please edit your post to add details.
– wjandrea
Dec 20 '18 at 18:57










1 Answer
1






active

oldest

votes


















0














The content of kubernetes.list is creating problems. Since this file only contains a single line which is obviously not correct so it is better to either delete the file using:



sudo rm /etc/apt/sources.list.d/kubernetes.list


or open file using nano:



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


and put # before the line to comment it out. Save file using Ctrl+X. and try updating again.






share|improve this answer




























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    The content of kubernetes.list is creating problems. Since this file only contains a single line which is obviously not correct so it is better to either delete the file using:



    sudo rm /etc/apt/sources.list.d/kubernetes.list


    or open file using nano:



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


    and put # before the line to comment it out. Save file using Ctrl+X. and try updating again.






    share|improve this answer


























      0














      The content of kubernetes.list is creating problems. Since this file only contains a single line which is obviously not correct so it is better to either delete the file using:



      sudo rm /etc/apt/sources.list.d/kubernetes.list


      or open file using nano:



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


      and put # before the line to comment it out. Save file using Ctrl+X. and try updating again.






      share|improve this answer
























        0












        0








        0






        The content of kubernetes.list is creating problems. Since this file only contains a single line which is obviously not correct so it is better to either delete the file using:



        sudo rm /etc/apt/sources.list.d/kubernetes.list


        or open file using nano:



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


        and put # before the line to comment it out. Save file using Ctrl+X. and try updating again.






        share|improve this answer












        The content of kubernetes.list is creating problems. Since this file only contains a single line which is obviously not correct so it is better to either delete the file using:



        sudo rm /etc/apt/sources.list.d/kubernetes.list


        or open file using nano:



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


        and put # before the line to comment it out. Save file using Ctrl+X. and try updating again.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 20 '18 at 8:02









        Kulfy

        3,45841039




        3,45841039















            Popular posts from this blog

            Mouse cursor on multiple screens with different PPI

            Agildo Ribeiro

            Sometime when accessing a menu: “Ubuntu 16.04 has experienced an internal error”