How do I restore my system OS back to its original condition after attempting to install Kali linux tools onto Ubuntu 16.04?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
4
down vote

favorite
1












I was attempting to install some Kali linux tools onto my computer running Ubuntu 16.04 using katoolin, and the majority of it worked out and installed properly, but when I tried to upgrade it an error came up. Eventually after some tinkering, the available updates from katoolin disappeared. Now when I boot Ubuntu does not even show up as Ubuntu, it says Kali Linux on the GRUB menu instead. I am not sure how to go about attempting to solve any of these problems as I am pretty new to Linux, so I was hoping someone out there could help.



Also, as of now GNOME is not loading, so I am at the stage of using a virtual console (I got there by pressing Ctrl+Alt+F1).







share|improve this question

























    up vote
    4
    down vote

    favorite
    1












    I was attempting to install some Kali linux tools onto my computer running Ubuntu 16.04 using katoolin, and the majority of it worked out and installed properly, but when I tried to upgrade it an error came up. Eventually after some tinkering, the available updates from katoolin disappeared. Now when I boot Ubuntu does not even show up as Ubuntu, it says Kali Linux on the GRUB menu instead. I am not sure how to go about attempting to solve any of these problems as I am pretty new to Linux, so I was hoping someone out there could help.



    Also, as of now GNOME is not loading, so I am at the stage of using a virtual console (I got there by pressing Ctrl+Alt+F1).







    share|improve this question























      up vote
      4
      down vote

      favorite
      1









      up vote
      4
      down vote

      favorite
      1






      1





      I was attempting to install some Kali linux tools onto my computer running Ubuntu 16.04 using katoolin, and the majority of it worked out and installed properly, but when I tried to upgrade it an error came up. Eventually after some tinkering, the available updates from katoolin disappeared. Now when I boot Ubuntu does not even show up as Ubuntu, it says Kali Linux on the GRUB menu instead. I am not sure how to go about attempting to solve any of these problems as I am pretty new to Linux, so I was hoping someone out there could help.



      Also, as of now GNOME is not loading, so I am at the stage of using a virtual console (I got there by pressing Ctrl+Alt+F1).







      share|improve this question













      I was attempting to install some Kali linux tools onto my computer running Ubuntu 16.04 using katoolin, and the majority of it worked out and installed properly, but when I tried to upgrade it an error came up. Eventually after some tinkering, the available updates from katoolin disappeared. Now when I boot Ubuntu does not even show up as Ubuntu, it says Kali Linux on the GRUB menu instead. I am not sure how to go about attempting to solve any of these problems as I am pretty new to Linux, so I was hoping someone out there could help.



      Also, as of now GNOME is not loading, so I am at the stage of using a virtual console (I got there by pressing Ctrl+Alt+F1).









      share|improve this question












      share|improve this question




      share|improve this question








      edited Mar 23 at 9:27









      Saud AlFadhli

      1053




      1053









      asked Mar 23 at 4:06









      Kaushik

      241




      241




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          5
          down vote














          1. All actions with apt are logged. These files are available in /var/log/apt/. To view the most recent history log run:



            less /var/log/apt/history.log 


            This will show you the changes that you made installing Katoolin and Kali linux tools.



          2. Copy these changes from /var/log/apt/history.log into a text file and save the file.


          3. Undo all the changes that you made since installing Katoolin one by one. Take your time and check your work as you go to avoid making typing errors.



          4. Remove Katoolin.



            sudo rm -r /usr/bin/katoolin



          5. Important! Look in your software sources for any repositories added by Katoolin and remove these repositories from your software sources. You are going to be reinstalling the Ubuntu desktop system in step 7, and if you don't remove all the software sources that were added by Katoolin it may interfere with step 7.



            Check what software sources have been added by Katoolin.



            cat /etc/apt/sources.list | grep kali


            If you see a kali software source, remove its deb and deb-src from sources.list and then save the file.



            Finish by manually checking your software sources in /etc/apt/sources.list and from the Dash by clicking on Software & Updates to open a Software & Updates window -> Other Software tab to make sure that you removed all the software sources that were added by Katoolin.




          6. Update the list of available software.



            sudo apt update



          7. If you are using Ubuntu, finish by reinstalling the Ubuntu desktop system.



            sudo apt-cache depends ubuntu-desktop | grep '[ |]Depends: [^<]' | cut -d: -f2 | tr -d ' ' | xargs sudo apt-get --reinstall install -y



          8. Install grub to the MBR of your boot drive with these commands:



            sudo apt-get --reinstall install base-files/xenial-updates && sudo reboot 
            sudo os-prober
            sudo update-grub



          9. When you have completed these steps, you may reboot the computer.



            sudo reboot 


          Before installing katoolin again read the last section of this answer for advice about how to prevent the same problem from reoccurring.






          share|improve this answer























          • I think it goes deeper than the desktop. If grub is reporting kali, I think his core system has been updated to kali.
            – ravery
            Mar 23 at 4:20






          • 2




            @ravery katoolin frequently causes this error in the GRUB menu. His core system has not been updated to Kali, only the entry in the GRUB menu has been superficially changed from Ubuntu to Kali as indicated in step 8 of this answer and also in this answer: askubuntu.com/questions/836270/…
            – karel
            Mar 23 at 4:24











          • ubuntu-desktop is just a lowly meta-package so apt install --reinstall won't do anything more than a plain install would. There's an another answer for reinstalling dependencies.
            – Oli♦
            Mar 23 at 10:11











          • How would I go about undoing all of the upgrades. I was thinking about using the purge command, which I found online, but then I would have to type all 900 packages out individually because I cant do anything but type. Is there a simple way to undo all of the things I did. All of it was just me upgrading using apt-get upgrade and me using autoremove. I am assuming all I need to do is undo the upgrading parts. I feel like there is a smarter way to do it. I can only get to the console (I think that is what its called, I got there using ctrl alt f1), no gui, so what can I do? Thanks for the ans.!
            – Kaushik
            Mar 24 at 0:40










          • katoolin also installs packages from GitHub. Removing multiple packages that were installed from GitHub will be a lot of hard work. Finding and removing orphaned packages (with deborphan) left over after removing packages that were quickly uninstalled with apt is even more hard work, and can also break your system if not done slowly and carefully. Fortunately it is not necessary to use deborphan.
            – karel
            Mar 24 at 1:19











          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',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          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%2f1018441%2fhow-do-i-restore-my-system-os-back-to-its-original-condition-after-attempting-to%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          5
          down vote














          1. All actions with apt are logged. These files are available in /var/log/apt/. To view the most recent history log run:



            less /var/log/apt/history.log 


            This will show you the changes that you made installing Katoolin and Kali linux tools.



          2. Copy these changes from /var/log/apt/history.log into a text file and save the file.


          3. Undo all the changes that you made since installing Katoolin one by one. Take your time and check your work as you go to avoid making typing errors.



          4. Remove Katoolin.



            sudo rm -r /usr/bin/katoolin



          5. Important! Look in your software sources for any repositories added by Katoolin and remove these repositories from your software sources. You are going to be reinstalling the Ubuntu desktop system in step 7, and if you don't remove all the software sources that were added by Katoolin it may interfere with step 7.



            Check what software sources have been added by Katoolin.



            cat /etc/apt/sources.list | grep kali


            If you see a kali software source, remove its deb and deb-src from sources.list and then save the file.



            Finish by manually checking your software sources in /etc/apt/sources.list and from the Dash by clicking on Software & Updates to open a Software & Updates window -> Other Software tab to make sure that you removed all the software sources that were added by Katoolin.




          6. Update the list of available software.



            sudo apt update



          7. If you are using Ubuntu, finish by reinstalling the Ubuntu desktop system.



            sudo apt-cache depends ubuntu-desktop | grep '[ |]Depends: [^<]' | cut -d: -f2 | tr -d ' ' | xargs sudo apt-get --reinstall install -y



          8. Install grub to the MBR of your boot drive with these commands:



            sudo apt-get --reinstall install base-files/xenial-updates && sudo reboot 
            sudo os-prober
            sudo update-grub



          9. When you have completed these steps, you may reboot the computer.



            sudo reboot 


          Before installing katoolin again read the last section of this answer for advice about how to prevent the same problem from reoccurring.






          share|improve this answer























          • I think it goes deeper than the desktop. If grub is reporting kali, I think his core system has been updated to kali.
            – ravery
            Mar 23 at 4:20






          • 2




            @ravery katoolin frequently causes this error in the GRUB menu. His core system has not been updated to Kali, only the entry in the GRUB menu has been superficially changed from Ubuntu to Kali as indicated in step 8 of this answer and also in this answer: askubuntu.com/questions/836270/…
            – karel
            Mar 23 at 4:24











          • ubuntu-desktop is just a lowly meta-package so apt install --reinstall won't do anything more than a plain install would. There's an another answer for reinstalling dependencies.
            – Oli♦
            Mar 23 at 10:11











          • How would I go about undoing all of the upgrades. I was thinking about using the purge command, which I found online, but then I would have to type all 900 packages out individually because I cant do anything but type. Is there a simple way to undo all of the things I did. All of it was just me upgrading using apt-get upgrade and me using autoremove. I am assuming all I need to do is undo the upgrading parts. I feel like there is a smarter way to do it. I can only get to the console (I think that is what its called, I got there using ctrl alt f1), no gui, so what can I do? Thanks for the ans.!
            – Kaushik
            Mar 24 at 0:40










          • katoolin also installs packages from GitHub. Removing multiple packages that were installed from GitHub will be a lot of hard work. Finding and removing orphaned packages (with deborphan) left over after removing packages that were quickly uninstalled with apt is even more hard work, and can also break your system if not done slowly and carefully. Fortunately it is not necessary to use deborphan.
            – karel
            Mar 24 at 1:19















          up vote
          5
          down vote














          1. All actions with apt are logged. These files are available in /var/log/apt/. To view the most recent history log run:



            less /var/log/apt/history.log 


            This will show you the changes that you made installing Katoolin and Kali linux tools.



          2. Copy these changes from /var/log/apt/history.log into a text file and save the file.


          3. Undo all the changes that you made since installing Katoolin one by one. Take your time and check your work as you go to avoid making typing errors.



          4. Remove Katoolin.



            sudo rm -r /usr/bin/katoolin



          5. Important! Look in your software sources for any repositories added by Katoolin and remove these repositories from your software sources. You are going to be reinstalling the Ubuntu desktop system in step 7, and if you don't remove all the software sources that were added by Katoolin it may interfere with step 7.



            Check what software sources have been added by Katoolin.



            cat /etc/apt/sources.list | grep kali


            If you see a kali software source, remove its deb and deb-src from sources.list and then save the file.



            Finish by manually checking your software sources in /etc/apt/sources.list and from the Dash by clicking on Software & Updates to open a Software & Updates window -> Other Software tab to make sure that you removed all the software sources that were added by Katoolin.




          6. Update the list of available software.



            sudo apt update



          7. If you are using Ubuntu, finish by reinstalling the Ubuntu desktop system.



            sudo apt-cache depends ubuntu-desktop | grep '[ |]Depends: [^<]' | cut -d: -f2 | tr -d ' ' | xargs sudo apt-get --reinstall install -y



          8. Install grub to the MBR of your boot drive with these commands:



            sudo apt-get --reinstall install base-files/xenial-updates && sudo reboot 
            sudo os-prober
            sudo update-grub



          9. When you have completed these steps, you may reboot the computer.



            sudo reboot 


          Before installing katoolin again read the last section of this answer for advice about how to prevent the same problem from reoccurring.






          share|improve this answer























          • I think it goes deeper than the desktop. If grub is reporting kali, I think his core system has been updated to kali.
            – ravery
            Mar 23 at 4:20






          • 2




            @ravery katoolin frequently causes this error in the GRUB menu. His core system has not been updated to Kali, only the entry in the GRUB menu has been superficially changed from Ubuntu to Kali as indicated in step 8 of this answer and also in this answer: askubuntu.com/questions/836270/…
            – karel
            Mar 23 at 4:24











          • ubuntu-desktop is just a lowly meta-package so apt install --reinstall won't do anything more than a plain install would. There's an another answer for reinstalling dependencies.
            – Oli♦
            Mar 23 at 10:11











          • How would I go about undoing all of the upgrades. I was thinking about using the purge command, which I found online, but then I would have to type all 900 packages out individually because I cant do anything but type. Is there a simple way to undo all of the things I did. All of it was just me upgrading using apt-get upgrade and me using autoremove. I am assuming all I need to do is undo the upgrading parts. I feel like there is a smarter way to do it. I can only get to the console (I think that is what its called, I got there using ctrl alt f1), no gui, so what can I do? Thanks for the ans.!
            – Kaushik
            Mar 24 at 0:40










          • katoolin also installs packages from GitHub. Removing multiple packages that were installed from GitHub will be a lot of hard work. Finding and removing orphaned packages (with deborphan) left over after removing packages that were quickly uninstalled with apt is even more hard work, and can also break your system if not done slowly and carefully. Fortunately it is not necessary to use deborphan.
            – karel
            Mar 24 at 1:19













          up vote
          5
          down vote










          up vote
          5
          down vote










          1. All actions with apt are logged. These files are available in /var/log/apt/. To view the most recent history log run:



            less /var/log/apt/history.log 


            This will show you the changes that you made installing Katoolin and Kali linux tools.



          2. Copy these changes from /var/log/apt/history.log into a text file and save the file.


          3. Undo all the changes that you made since installing Katoolin one by one. Take your time and check your work as you go to avoid making typing errors.



          4. Remove Katoolin.



            sudo rm -r /usr/bin/katoolin



          5. Important! Look in your software sources for any repositories added by Katoolin and remove these repositories from your software sources. You are going to be reinstalling the Ubuntu desktop system in step 7, and if you don't remove all the software sources that were added by Katoolin it may interfere with step 7.



            Check what software sources have been added by Katoolin.



            cat /etc/apt/sources.list | grep kali


            If you see a kali software source, remove its deb and deb-src from sources.list and then save the file.



            Finish by manually checking your software sources in /etc/apt/sources.list and from the Dash by clicking on Software & Updates to open a Software & Updates window -> Other Software tab to make sure that you removed all the software sources that were added by Katoolin.




          6. Update the list of available software.



            sudo apt update



          7. If you are using Ubuntu, finish by reinstalling the Ubuntu desktop system.



            sudo apt-cache depends ubuntu-desktop | grep '[ |]Depends: [^<]' | cut -d: -f2 | tr -d ' ' | xargs sudo apt-get --reinstall install -y



          8. Install grub to the MBR of your boot drive with these commands:



            sudo apt-get --reinstall install base-files/xenial-updates && sudo reboot 
            sudo os-prober
            sudo update-grub



          9. When you have completed these steps, you may reboot the computer.



            sudo reboot 


          Before installing katoolin again read the last section of this answer for advice about how to prevent the same problem from reoccurring.






          share|improve this answer
















          1. All actions with apt are logged. These files are available in /var/log/apt/. To view the most recent history log run:



            less /var/log/apt/history.log 


            This will show you the changes that you made installing Katoolin and Kali linux tools.



          2. Copy these changes from /var/log/apt/history.log into a text file and save the file.


          3. Undo all the changes that you made since installing Katoolin one by one. Take your time and check your work as you go to avoid making typing errors.



          4. Remove Katoolin.



            sudo rm -r /usr/bin/katoolin



          5. Important! Look in your software sources for any repositories added by Katoolin and remove these repositories from your software sources. You are going to be reinstalling the Ubuntu desktop system in step 7, and if you don't remove all the software sources that were added by Katoolin it may interfere with step 7.



            Check what software sources have been added by Katoolin.



            cat /etc/apt/sources.list | grep kali


            If you see a kali software source, remove its deb and deb-src from sources.list and then save the file.



            Finish by manually checking your software sources in /etc/apt/sources.list and from the Dash by clicking on Software & Updates to open a Software & Updates window -> Other Software tab to make sure that you removed all the software sources that were added by Katoolin.




          6. Update the list of available software.



            sudo apt update



          7. If you are using Ubuntu, finish by reinstalling the Ubuntu desktop system.



            sudo apt-cache depends ubuntu-desktop | grep '[ |]Depends: [^<]' | cut -d: -f2 | tr -d ' ' | xargs sudo apt-get --reinstall install -y



          8. Install grub to the MBR of your boot drive with these commands:



            sudo apt-get --reinstall install base-files/xenial-updates && sudo reboot 
            sudo os-prober
            sudo update-grub



          9. When you have completed these steps, you may reboot the computer.



            sudo reboot 


          Before installing katoolin again read the last section of this answer for advice about how to prevent the same problem from reoccurring.







          share|improve this answer















          share|improve this answer



          share|improve this answer








          edited Apr 17 at 2:11


























          answered Mar 23 at 4:14









          karel

          49.5k11105126




          49.5k11105126











          • I think it goes deeper than the desktop. If grub is reporting kali, I think his core system has been updated to kali.
            – ravery
            Mar 23 at 4:20






          • 2




            @ravery katoolin frequently causes this error in the GRUB menu. His core system has not been updated to Kali, only the entry in the GRUB menu has been superficially changed from Ubuntu to Kali as indicated in step 8 of this answer and also in this answer: askubuntu.com/questions/836270/…
            – karel
            Mar 23 at 4:24











          • ubuntu-desktop is just a lowly meta-package so apt install --reinstall won't do anything more than a plain install would. There's an another answer for reinstalling dependencies.
            – Oli♦
            Mar 23 at 10:11











          • How would I go about undoing all of the upgrades. I was thinking about using the purge command, which I found online, but then I would have to type all 900 packages out individually because I cant do anything but type. Is there a simple way to undo all of the things I did. All of it was just me upgrading using apt-get upgrade and me using autoremove. I am assuming all I need to do is undo the upgrading parts. I feel like there is a smarter way to do it. I can only get to the console (I think that is what its called, I got there using ctrl alt f1), no gui, so what can I do? Thanks for the ans.!
            – Kaushik
            Mar 24 at 0:40










          • katoolin also installs packages from GitHub. Removing multiple packages that were installed from GitHub will be a lot of hard work. Finding and removing orphaned packages (with deborphan) left over after removing packages that were quickly uninstalled with apt is even more hard work, and can also break your system if not done slowly and carefully. Fortunately it is not necessary to use deborphan.
            – karel
            Mar 24 at 1:19

















          • I think it goes deeper than the desktop. If grub is reporting kali, I think his core system has been updated to kali.
            – ravery
            Mar 23 at 4:20






          • 2




            @ravery katoolin frequently causes this error in the GRUB menu. His core system has not been updated to Kali, only the entry in the GRUB menu has been superficially changed from Ubuntu to Kali as indicated in step 8 of this answer and also in this answer: askubuntu.com/questions/836270/…
            – karel
            Mar 23 at 4:24











          • ubuntu-desktop is just a lowly meta-package so apt install --reinstall won't do anything more than a plain install would. There's an another answer for reinstalling dependencies.
            – Oli♦
            Mar 23 at 10:11











          • How would I go about undoing all of the upgrades. I was thinking about using the purge command, which I found online, but then I would have to type all 900 packages out individually because I cant do anything but type. Is there a simple way to undo all of the things I did. All of it was just me upgrading using apt-get upgrade and me using autoremove. I am assuming all I need to do is undo the upgrading parts. I feel like there is a smarter way to do it. I can only get to the console (I think that is what its called, I got there using ctrl alt f1), no gui, so what can I do? Thanks for the ans.!
            – Kaushik
            Mar 24 at 0:40










          • katoolin also installs packages from GitHub. Removing multiple packages that were installed from GitHub will be a lot of hard work. Finding and removing orphaned packages (with deborphan) left over after removing packages that were quickly uninstalled with apt is even more hard work, and can also break your system if not done slowly and carefully. Fortunately it is not necessary to use deborphan.
            – karel
            Mar 24 at 1:19
















          I think it goes deeper than the desktop. If grub is reporting kali, I think his core system has been updated to kali.
          – ravery
          Mar 23 at 4:20




          I think it goes deeper than the desktop. If grub is reporting kali, I think his core system has been updated to kali.
          – ravery
          Mar 23 at 4:20




          2




          2




          @ravery katoolin frequently causes this error in the GRUB menu. His core system has not been updated to Kali, only the entry in the GRUB menu has been superficially changed from Ubuntu to Kali as indicated in step 8 of this answer and also in this answer: askubuntu.com/questions/836270/…
          – karel
          Mar 23 at 4:24





          @ravery katoolin frequently causes this error in the GRUB menu. His core system has not been updated to Kali, only the entry in the GRUB menu has been superficially changed from Ubuntu to Kali as indicated in step 8 of this answer and also in this answer: askubuntu.com/questions/836270/…
          – karel
          Mar 23 at 4:24













          ubuntu-desktop is just a lowly meta-package so apt install --reinstall won't do anything more than a plain install would. There's an another answer for reinstalling dependencies.
          – Oli♦
          Mar 23 at 10:11





          ubuntu-desktop is just a lowly meta-package so apt install --reinstall won't do anything more than a plain install would. There's an another answer for reinstalling dependencies.
          – Oli♦
          Mar 23 at 10:11













          How would I go about undoing all of the upgrades. I was thinking about using the purge command, which I found online, but then I would have to type all 900 packages out individually because I cant do anything but type. Is there a simple way to undo all of the things I did. All of it was just me upgrading using apt-get upgrade and me using autoremove. I am assuming all I need to do is undo the upgrading parts. I feel like there is a smarter way to do it. I can only get to the console (I think that is what its called, I got there using ctrl alt f1), no gui, so what can I do? Thanks for the ans.!
          – Kaushik
          Mar 24 at 0:40




          How would I go about undoing all of the upgrades. I was thinking about using the purge command, which I found online, but then I would have to type all 900 packages out individually because I cant do anything but type. Is there a simple way to undo all of the things I did. All of it was just me upgrading using apt-get upgrade and me using autoremove. I am assuming all I need to do is undo the upgrading parts. I feel like there is a smarter way to do it. I can only get to the console (I think that is what its called, I got there using ctrl alt f1), no gui, so what can I do? Thanks for the ans.!
          – Kaushik
          Mar 24 at 0:40












          katoolin also installs packages from GitHub. Removing multiple packages that were installed from GitHub will be a lot of hard work. Finding and removing orphaned packages (with deborphan) left over after removing packages that were quickly uninstalled with apt is even more hard work, and can also break your system if not done slowly and carefully. Fortunately it is not necessary to use deborphan.
          – karel
          Mar 24 at 1:19





          katoolin also installs packages from GitHub. Removing multiple packages that were installed from GitHub will be a lot of hard work. Finding and removing orphaned packages (with deborphan) left over after removing packages that were quickly uninstalled with apt is even more hard work, and can also break your system if not done slowly and carefully. Fortunately it is not necessary to use deborphan.
          – karel
          Mar 24 at 1:19













           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1018441%2fhow-do-i-restore-my-system-os-back-to-its-original-condition-after-attempting-to%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          pylint3 and pip3 broken

          Missing snmpget and snmpwalk

          How to enroll fingerprints to Ubuntu 17.10 with VFS491