Deleted /usr/include by mistake












1















Like a real idiot, I deleted my




/usr/include




on 13.04, is there anyway I can retrieve this?










share|improve this question























  • so do i :( trying to install compile ncl, because ncl-ncarg had dependency problems

    – Sergio
    Jul 27 '16 at 5:08
















1















Like a real idiot, I deleted my




/usr/include




on 13.04, is there anyway I can retrieve this?










share|improve this question























  • so do i :( trying to install compile ncl, because ncl-ncarg had dependency problems

    – Sergio
    Jul 27 '16 at 5:08














1












1








1








Like a real idiot, I deleted my




/usr/include




on 13.04, is there anyway I can retrieve this?










share|improve this question














Like a real idiot, I deleted my




/usr/include




on 13.04, is there anyway I can retrieve this?







delete






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jul 14 '13 at 21:34









RadagaspRadagasp

1751119




1751119













  • so do i :( trying to install compile ncl, because ncl-ncarg had dependency problems

    – Sergio
    Jul 27 '16 at 5:08



















  • so do i :( trying to install compile ncl, because ncl-ncarg had dependency problems

    – Sergio
    Jul 27 '16 at 5:08

















so do i :( trying to install compile ncl, because ncl-ncarg had dependency problems

– Sergio
Jul 27 '16 at 5:08





so do i :( trying to install compile ncl, because ncl-ncarg had dependency problems

– Sergio
Jul 27 '16 at 5:08










2 Answers
2






active

oldest

votes


















1














/usr/include contains data about your packages, which means that a fresh install wouldn't write anything to it. I'm afraid your system has suffered a great loss.



Maybe you could try an update for your packages, but from experience, I know this doesn't usually work with Ubuntu.



sudo apt-get update
sudo apt-get upgrade


If your lucky, the apt cache will still have information about packages that used /usr/include. You can find a list using dpkg -S /usr/include/*, and use sudo apt-get reinstall [package] to fix things.



Edit : Best solution found in the comments :



sudo apt-get install --reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ')


In order to reinstall all packages that where corrupted.






share|improve this answer


























  • Hi thanks I ran dpkg -S /usr/include/* and got a massive list, how do I use this information with sudo apt-get reinstall [package] ?

    – Radagasp
    Jul 14 '13 at 21:43











  • The list you got is the list of packages that used things in /usr/include. By reinstalling it, you'll repopulate them. Think about recreating /usr/include if you deleted the directory (as root). You could do something like sudo apt-get reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ') but keep in mind that it is RISKY.

    – John WH Smith
    Jul 14 '13 at 21:55













  • thanks it says, apt-get reinstall is an invalid operation

    – Radagasp
    Jul 14 '13 at 22:04











  • My bad. sudo apt-get install --reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ') - Still as RISKY

    – John WH Smith
    Jul 14 '13 at 22:05








  • 1





    Perhaps I should do a back up first?

    – Radagasp
    Jul 14 '13 at 22:11



















0














Hi (and thanks for solution), some additional commands used by me:



dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ' > app.list
cat app.list | tr ' ' 'n' | sort | uniq > sortapp.list
cat sortapp.list | tr 'n' ' ' > sortapp-2.list
sudo apt update
sudo apt-get install --reinstall $( cat sortapp-2.list )





share|improve this answer








New contributor




usertc is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f320072%2fdeleted-usr-include-by-mistake%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    /usr/include contains data about your packages, which means that a fresh install wouldn't write anything to it. I'm afraid your system has suffered a great loss.



    Maybe you could try an update for your packages, but from experience, I know this doesn't usually work with Ubuntu.



    sudo apt-get update
    sudo apt-get upgrade


    If your lucky, the apt cache will still have information about packages that used /usr/include. You can find a list using dpkg -S /usr/include/*, and use sudo apt-get reinstall [package] to fix things.



    Edit : Best solution found in the comments :



    sudo apt-get install --reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ')


    In order to reinstall all packages that where corrupted.






    share|improve this answer


























    • Hi thanks I ran dpkg -S /usr/include/* and got a massive list, how do I use this information with sudo apt-get reinstall [package] ?

      – Radagasp
      Jul 14 '13 at 21:43











    • The list you got is the list of packages that used things in /usr/include. By reinstalling it, you'll repopulate them. Think about recreating /usr/include if you deleted the directory (as root). You could do something like sudo apt-get reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ') but keep in mind that it is RISKY.

      – John WH Smith
      Jul 14 '13 at 21:55













    • thanks it says, apt-get reinstall is an invalid operation

      – Radagasp
      Jul 14 '13 at 22:04











    • My bad. sudo apt-get install --reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ') - Still as RISKY

      – John WH Smith
      Jul 14 '13 at 22:05








    • 1





      Perhaps I should do a back up first?

      – Radagasp
      Jul 14 '13 at 22:11
















    1














    /usr/include contains data about your packages, which means that a fresh install wouldn't write anything to it. I'm afraid your system has suffered a great loss.



    Maybe you could try an update for your packages, but from experience, I know this doesn't usually work with Ubuntu.



    sudo apt-get update
    sudo apt-get upgrade


    If your lucky, the apt cache will still have information about packages that used /usr/include. You can find a list using dpkg -S /usr/include/*, and use sudo apt-get reinstall [package] to fix things.



    Edit : Best solution found in the comments :



    sudo apt-get install --reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ')


    In order to reinstall all packages that where corrupted.






    share|improve this answer


























    • Hi thanks I ran dpkg -S /usr/include/* and got a massive list, how do I use this information with sudo apt-get reinstall [package] ?

      – Radagasp
      Jul 14 '13 at 21:43











    • The list you got is the list of packages that used things in /usr/include. By reinstalling it, you'll repopulate them. Think about recreating /usr/include if you deleted the directory (as root). You could do something like sudo apt-get reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ') but keep in mind that it is RISKY.

      – John WH Smith
      Jul 14 '13 at 21:55













    • thanks it says, apt-get reinstall is an invalid operation

      – Radagasp
      Jul 14 '13 at 22:04











    • My bad. sudo apt-get install --reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ') - Still as RISKY

      – John WH Smith
      Jul 14 '13 at 22:05








    • 1





      Perhaps I should do a back up first?

      – Radagasp
      Jul 14 '13 at 22:11














    1












    1








    1







    /usr/include contains data about your packages, which means that a fresh install wouldn't write anything to it. I'm afraid your system has suffered a great loss.



    Maybe you could try an update for your packages, but from experience, I know this doesn't usually work with Ubuntu.



    sudo apt-get update
    sudo apt-get upgrade


    If your lucky, the apt cache will still have information about packages that used /usr/include. You can find a list using dpkg -S /usr/include/*, and use sudo apt-get reinstall [package] to fix things.



    Edit : Best solution found in the comments :



    sudo apt-get install --reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ')


    In order to reinstall all packages that where corrupted.






    share|improve this answer















    /usr/include contains data about your packages, which means that a fresh install wouldn't write anything to it. I'm afraid your system has suffered a great loss.



    Maybe you could try an update for your packages, but from experience, I know this doesn't usually work with Ubuntu.



    sudo apt-get update
    sudo apt-get upgrade


    If your lucky, the apt cache will still have information about packages that used /usr/include. You can find a list using dpkg -S /usr/include/*, and use sudo apt-get reinstall [package] to fix things.



    Edit : Best solution found in the comments :



    sudo apt-get install --reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ')


    In order to reinstall all packages that where corrupted.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Jul 15 '13 at 13:17

























    answered Jul 14 '13 at 21:38









    John WH SmithJohn WH Smith

    1,723921




    1,723921













    • Hi thanks I ran dpkg -S /usr/include/* and got a massive list, how do I use this information with sudo apt-get reinstall [package] ?

      – Radagasp
      Jul 14 '13 at 21:43











    • The list you got is the list of packages that used things in /usr/include. By reinstalling it, you'll repopulate them. Think about recreating /usr/include if you deleted the directory (as root). You could do something like sudo apt-get reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ') but keep in mind that it is RISKY.

      – John WH Smith
      Jul 14 '13 at 21:55













    • thanks it says, apt-get reinstall is an invalid operation

      – Radagasp
      Jul 14 '13 at 22:04











    • My bad. sudo apt-get install --reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ') - Still as RISKY

      – John WH Smith
      Jul 14 '13 at 22:05








    • 1





      Perhaps I should do a back up first?

      – Radagasp
      Jul 14 '13 at 22:11



















    • Hi thanks I ran dpkg -S /usr/include/* and got a massive list, how do I use this information with sudo apt-get reinstall [package] ?

      – Radagasp
      Jul 14 '13 at 21:43











    • The list you got is the list of packages that used things in /usr/include. By reinstalling it, you'll repopulate them. Think about recreating /usr/include if you deleted the directory (as root). You could do something like sudo apt-get reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ') but keep in mind that it is RISKY.

      – John WH Smith
      Jul 14 '13 at 21:55













    • thanks it says, apt-get reinstall is an invalid operation

      – Radagasp
      Jul 14 '13 at 22:04











    • My bad. sudo apt-get install --reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ') - Still as RISKY

      – John WH Smith
      Jul 14 '13 at 22:05








    • 1





      Perhaps I should do a back up first?

      – Radagasp
      Jul 14 '13 at 22:11

















    Hi thanks I ran dpkg -S /usr/include/* and got a massive list, how do I use this information with sudo apt-get reinstall [package] ?

    – Radagasp
    Jul 14 '13 at 21:43





    Hi thanks I ran dpkg -S /usr/include/* and got a massive list, how do I use this information with sudo apt-get reinstall [package] ?

    – Radagasp
    Jul 14 '13 at 21:43













    The list you got is the list of packages that used things in /usr/include. By reinstalling it, you'll repopulate them. Think about recreating /usr/include if you deleted the directory (as root). You could do something like sudo apt-get reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ') but keep in mind that it is RISKY.

    – John WH Smith
    Jul 14 '13 at 21:55







    The list you got is the list of packages that used things in /usr/include. By reinstalling it, you'll repopulate them. Think about recreating /usr/include if you deleted the directory (as root). You could do something like sudo apt-get reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ') but keep in mind that it is RISKY.

    – John WH Smith
    Jul 14 '13 at 21:55















    thanks it says, apt-get reinstall is an invalid operation

    – Radagasp
    Jul 14 '13 at 22:04





    thanks it says, apt-get reinstall is an invalid operation

    – Radagasp
    Jul 14 '13 at 22:04













    My bad. sudo apt-get install --reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ') - Still as RISKY

    – John WH Smith
    Jul 14 '13 at 22:05







    My bad. sudo apt-get install --reinstall $(dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ') - Still as RISKY

    – John WH Smith
    Jul 14 '13 at 22:05






    1




    1





    Perhaps I should do a back up first?

    – Radagasp
    Jul 14 '13 at 22:11





    Perhaps I should do a back up first?

    – Radagasp
    Jul 14 '13 at 22:11













    0














    Hi (and thanks for solution), some additional commands used by me:



    dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ' > app.list
    cat app.list | tr ' ' 'n' | sort | uniq > sortapp.list
    cat sortapp.list | tr 'n' ' ' > sortapp-2.list
    sudo apt update
    sudo apt-get install --reinstall $( cat sortapp-2.list )





    share|improve this answer








    New contributor




    usertc is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.

























      0














      Hi (and thanks for solution), some additional commands used by me:



      dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ' > app.list
      cat app.list | tr ' ' 'n' | sort | uniq > sortapp.list
      cat sortapp.list | tr 'n' ' ' > sortapp-2.list
      sudo apt update
      sudo apt-get install --reinstall $( cat sortapp-2.list )





      share|improve this answer








      New contributor




      usertc is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.























        0












        0








        0







        Hi (and thanks for solution), some additional commands used by me:



        dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ' > app.list
        cat app.list | tr ' ' 'n' | sort | uniq > sortapp.list
        cat sortapp.list | tr 'n' ' ' > sortapp-2.list
        sudo apt update
        sudo apt-get install --reinstall $( cat sortapp-2.list )





        share|improve this answer








        New contributor




        usertc is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.










        Hi (and thanks for solution), some additional commands used by me:



        dpkg -S /usr/include/*|cut -d':' -f1|tr -d ','|tr 'n' ' ' > app.list
        cat app.list | tr ' ' 'n' | sort | uniq > sortapp.list
        cat sortapp.list | tr 'n' ' ' > sortapp-2.list
        sudo apt update
        sudo apt-get install --reinstall $( cat sortapp-2.list )






        share|improve this answer








        New contributor




        usertc is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        share|improve this answer



        share|improve this answer






        New contributor




        usertc is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered 6 hours ago









        usertcusertc

        1




        1




        New contributor




        usertc is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        usertc is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        usertc is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f320072%2fdeleted-usr-include-by-mistake%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            GameSpot

            日野市

            Tu-95轟炸機