How to restore fedora when a terminal command removed everything and resulted in black screen

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











up vote
1
down vote

favorite












I was using fedora 28 with cinnamon desktop environment. It also had gnome desktop environment.



I ran a command something along the lines of sudo dnf remove gnome* which remove everything there was along with the terminal as the default was gnome-terminal.



Now I can see an empty grey screen because I had auto-login enabled. I had only user account on the system.



How can I restore the removed packages and get the system back without losing the data?










share|improve this question



























    up vote
    1
    down vote

    favorite












    I was using fedora 28 with cinnamon desktop environment. It also had gnome desktop environment.



    I ran a command something along the lines of sudo dnf remove gnome* which remove everything there was along with the terminal as the default was gnome-terminal.



    Now I can see an empty grey screen because I had auto-login enabled. I had only user account on the system.



    How can I restore the removed packages and get the system back without losing the data?










    share|improve this question

























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I was using fedora 28 with cinnamon desktop environment. It also had gnome desktop environment.



      I ran a command something along the lines of sudo dnf remove gnome* which remove everything there was along with the terminal as the default was gnome-terminal.



      Now I can see an empty grey screen because I had auto-login enabled. I had only user account on the system.



      How can I restore the removed packages and get the system back without losing the data?










      share|improve this question















      I was using fedora 28 with cinnamon desktop environment. It also had gnome desktop environment.



      I ran a command something along the lines of sudo dnf remove gnome* which remove everything there was along with the terminal as the default was gnome-terminal.



      Now I can see an empty grey screen because I had auto-login enabled. I had only user account on the system.



      How can I restore the removed packages and get the system back without losing the data?







      fedora gnome cinnamon






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Sep 22 at 22:17









      roaima

      40.8k547111




      40.8k547111










      asked Sep 22 at 21:38









      Doc

      1092




      1092




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote













          The "empty grey screen" is probably the default background of an empty X11 server without a desktop environment running.



          Press Ctrl+Alt+F1 to switch to a text-based login prompt.
          Log in, enter cd /var/log to move into /var/log directory, and then enter less dnf.log. If it does not allow you to read the file, use sudo less dnf.log instead.



          Hopefully, the tail end of this log file will list the names of all the packages you mistakenly removed. Make a note of all of them: the list may include some packages that are not named like "gnome*", as they might have been removed because they depend on one or more of the "gnome*" packages.



          Use commands like sudo dnf install <package name> <package name> <package name...> to re-install the removed packages. Once all the mistakenly removed packages have been re-installed, reboot the system with sudo shutdown -r now. After the reboot, if you managed to reinstall all the packages you removed, the system should be as it was before the mistake.



          Unless you stored your data files somewhere you shouldn't, removing any packages should always leave user files and configuration files in place. Reinstalling the same packages should automatically use any existing configuration files for them, if available.






          share|improve this answer




















          • i can open terminal using fedora rescue but installing cinnamon or any desktop environment from there gives me an error which says 'can't connect to fedora repo' or something similar
            – Doc
            Sep 22 at 22:11










          • i have fedora 28 iso file. will it be any useful?
            – Doc
            Sep 22 at 22:13










          • Doc this isn't Rescue mode. Start your machine normally and then follow the instructions in this answer.
            – roaima
            Sep 22 at 22:16










          • I have reinstalled all the packages but still i have the grey screen
            – Doc
            Sep 22 at 23:25










          • i am getting a backup of data and will format the drive. Any other folder that may contain important data other than /home/droid/ which I need to backup?
            – Doc
            Sep 23 at 0:35

















          up vote
          1
          down vote













          dnf has a transaction history and rollback routines to revert to and/or undo operations.



          Issue sudo dnf history to get a list of transactions, find the transaction that borked the system, then issue either sudo dnf history undo <BorkingTransactionNumber> or sudo dnf history rollback <BorkingTransactionNumber - 1> where <BorkingTransactionNumber> is the number of the transaction that broke your system.



          See man dnf for more information on the history function and other options.






          share|improve this answer




















          • i tried reinstalling all the packages as described by @telcoM which didn't work out well. Now I have another problem askubuntu.com/questions/1078691/… to solve.
            – Doc
            Sep 26 at 18:49










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          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: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          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%2funix.stackexchange.com%2fquestions%2f470771%2fhow-to-restore-fedora-when-a-terminal-command-removed-everything-and-resulted-in%23new-answer', 'question_page');

          );

          Post as a guest






























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote













          The "empty grey screen" is probably the default background of an empty X11 server without a desktop environment running.



          Press Ctrl+Alt+F1 to switch to a text-based login prompt.
          Log in, enter cd /var/log to move into /var/log directory, and then enter less dnf.log. If it does not allow you to read the file, use sudo less dnf.log instead.



          Hopefully, the tail end of this log file will list the names of all the packages you mistakenly removed. Make a note of all of them: the list may include some packages that are not named like "gnome*", as they might have been removed because they depend on one or more of the "gnome*" packages.



          Use commands like sudo dnf install <package name> <package name> <package name...> to re-install the removed packages. Once all the mistakenly removed packages have been re-installed, reboot the system with sudo shutdown -r now. After the reboot, if you managed to reinstall all the packages you removed, the system should be as it was before the mistake.



          Unless you stored your data files somewhere you shouldn't, removing any packages should always leave user files and configuration files in place. Reinstalling the same packages should automatically use any existing configuration files for them, if available.






          share|improve this answer




















          • i can open terminal using fedora rescue but installing cinnamon or any desktop environment from there gives me an error which says 'can't connect to fedora repo' or something similar
            – Doc
            Sep 22 at 22:11










          • i have fedora 28 iso file. will it be any useful?
            – Doc
            Sep 22 at 22:13










          • Doc this isn't Rescue mode. Start your machine normally and then follow the instructions in this answer.
            – roaima
            Sep 22 at 22:16










          • I have reinstalled all the packages but still i have the grey screen
            – Doc
            Sep 22 at 23:25










          • i am getting a backup of data and will format the drive. Any other folder that may contain important data other than /home/droid/ which I need to backup?
            – Doc
            Sep 23 at 0:35














          up vote
          1
          down vote













          The "empty grey screen" is probably the default background of an empty X11 server without a desktop environment running.



          Press Ctrl+Alt+F1 to switch to a text-based login prompt.
          Log in, enter cd /var/log to move into /var/log directory, and then enter less dnf.log. If it does not allow you to read the file, use sudo less dnf.log instead.



          Hopefully, the tail end of this log file will list the names of all the packages you mistakenly removed. Make a note of all of them: the list may include some packages that are not named like "gnome*", as they might have been removed because they depend on one or more of the "gnome*" packages.



          Use commands like sudo dnf install <package name> <package name> <package name...> to re-install the removed packages. Once all the mistakenly removed packages have been re-installed, reboot the system with sudo shutdown -r now. After the reboot, if you managed to reinstall all the packages you removed, the system should be as it was before the mistake.



          Unless you stored your data files somewhere you shouldn't, removing any packages should always leave user files and configuration files in place. Reinstalling the same packages should automatically use any existing configuration files for them, if available.






          share|improve this answer




















          • i can open terminal using fedora rescue but installing cinnamon or any desktop environment from there gives me an error which says 'can't connect to fedora repo' or something similar
            – Doc
            Sep 22 at 22:11










          • i have fedora 28 iso file. will it be any useful?
            – Doc
            Sep 22 at 22:13










          • Doc this isn't Rescue mode. Start your machine normally and then follow the instructions in this answer.
            – roaima
            Sep 22 at 22:16










          • I have reinstalled all the packages but still i have the grey screen
            – Doc
            Sep 22 at 23:25










          • i am getting a backup of data and will format the drive. Any other folder that may contain important data other than /home/droid/ which I need to backup?
            – Doc
            Sep 23 at 0:35












          up vote
          1
          down vote










          up vote
          1
          down vote









          The "empty grey screen" is probably the default background of an empty X11 server without a desktop environment running.



          Press Ctrl+Alt+F1 to switch to a text-based login prompt.
          Log in, enter cd /var/log to move into /var/log directory, and then enter less dnf.log. If it does not allow you to read the file, use sudo less dnf.log instead.



          Hopefully, the tail end of this log file will list the names of all the packages you mistakenly removed. Make a note of all of them: the list may include some packages that are not named like "gnome*", as they might have been removed because they depend on one or more of the "gnome*" packages.



          Use commands like sudo dnf install <package name> <package name> <package name...> to re-install the removed packages. Once all the mistakenly removed packages have been re-installed, reboot the system with sudo shutdown -r now. After the reboot, if you managed to reinstall all the packages you removed, the system should be as it was before the mistake.



          Unless you stored your data files somewhere you shouldn't, removing any packages should always leave user files and configuration files in place. Reinstalling the same packages should automatically use any existing configuration files for them, if available.






          share|improve this answer












          The "empty grey screen" is probably the default background of an empty X11 server without a desktop environment running.



          Press Ctrl+Alt+F1 to switch to a text-based login prompt.
          Log in, enter cd /var/log to move into /var/log directory, and then enter less dnf.log. If it does not allow you to read the file, use sudo less dnf.log instead.



          Hopefully, the tail end of this log file will list the names of all the packages you mistakenly removed. Make a note of all of them: the list may include some packages that are not named like "gnome*", as they might have been removed because they depend on one or more of the "gnome*" packages.



          Use commands like sudo dnf install <package name> <package name> <package name...> to re-install the removed packages. Once all the mistakenly removed packages have been re-installed, reboot the system with sudo shutdown -r now. After the reboot, if you managed to reinstall all the packages you removed, the system should be as it was before the mistake.



          Unless you stored your data files somewhere you shouldn't, removing any packages should always leave user files and configuration files in place. Reinstalling the same packages should automatically use any existing configuration files for them, if available.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Sep 22 at 22:07









          telcoM

          12.2k11435




          12.2k11435











          • i can open terminal using fedora rescue but installing cinnamon or any desktop environment from there gives me an error which says 'can't connect to fedora repo' or something similar
            – Doc
            Sep 22 at 22:11










          • i have fedora 28 iso file. will it be any useful?
            – Doc
            Sep 22 at 22:13










          • Doc this isn't Rescue mode. Start your machine normally and then follow the instructions in this answer.
            – roaima
            Sep 22 at 22:16










          • I have reinstalled all the packages but still i have the grey screen
            – Doc
            Sep 22 at 23:25










          • i am getting a backup of data and will format the drive. Any other folder that may contain important data other than /home/droid/ which I need to backup?
            – Doc
            Sep 23 at 0:35
















          • i can open terminal using fedora rescue but installing cinnamon or any desktop environment from there gives me an error which says 'can't connect to fedora repo' or something similar
            – Doc
            Sep 22 at 22:11










          • i have fedora 28 iso file. will it be any useful?
            – Doc
            Sep 22 at 22:13










          • Doc this isn't Rescue mode. Start your machine normally and then follow the instructions in this answer.
            – roaima
            Sep 22 at 22:16










          • I have reinstalled all the packages but still i have the grey screen
            – Doc
            Sep 22 at 23:25










          • i am getting a backup of data and will format the drive. Any other folder that may contain important data other than /home/droid/ which I need to backup?
            – Doc
            Sep 23 at 0:35















          i can open terminal using fedora rescue but installing cinnamon or any desktop environment from there gives me an error which says 'can't connect to fedora repo' or something similar
          – Doc
          Sep 22 at 22:11




          i can open terminal using fedora rescue but installing cinnamon or any desktop environment from there gives me an error which says 'can't connect to fedora repo' or something similar
          – Doc
          Sep 22 at 22:11












          i have fedora 28 iso file. will it be any useful?
          – Doc
          Sep 22 at 22:13




          i have fedora 28 iso file. will it be any useful?
          – Doc
          Sep 22 at 22:13












          Doc this isn't Rescue mode. Start your machine normally and then follow the instructions in this answer.
          – roaima
          Sep 22 at 22:16




          Doc this isn't Rescue mode. Start your machine normally and then follow the instructions in this answer.
          – roaima
          Sep 22 at 22:16












          I have reinstalled all the packages but still i have the grey screen
          – Doc
          Sep 22 at 23:25




          I have reinstalled all the packages but still i have the grey screen
          – Doc
          Sep 22 at 23:25












          i am getting a backup of data and will format the drive. Any other folder that may contain important data other than /home/droid/ which I need to backup?
          – Doc
          Sep 23 at 0:35




          i am getting a backup of data and will format the drive. Any other folder that may contain important data other than /home/droid/ which I need to backup?
          – Doc
          Sep 23 at 0:35












          up vote
          1
          down vote













          dnf has a transaction history and rollback routines to revert to and/or undo operations.



          Issue sudo dnf history to get a list of transactions, find the transaction that borked the system, then issue either sudo dnf history undo <BorkingTransactionNumber> or sudo dnf history rollback <BorkingTransactionNumber - 1> where <BorkingTransactionNumber> is the number of the transaction that broke your system.



          See man dnf for more information on the history function and other options.






          share|improve this answer




















          • i tried reinstalling all the packages as described by @telcoM which didn't work out well. Now I have another problem askubuntu.com/questions/1078691/… to solve.
            – Doc
            Sep 26 at 18:49














          up vote
          1
          down vote













          dnf has a transaction history and rollback routines to revert to and/or undo operations.



          Issue sudo dnf history to get a list of transactions, find the transaction that borked the system, then issue either sudo dnf history undo <BorkingTransactionNumber> or sudo dnf history rollback <BorkingTransactionNumber - 1> where <BorkingTransactionNumber> is the number of the transaction that broke your system.



          See man dnf for more information on the history function and other options.






          share|improve this answer




















          • i tried reinstalling all the packages as described by @telcoM which didn't work out well. Now I have another problem askubuntu.com/questions/1078691/… to solve.
            – Doc
            Sep 26 at 18:49












          up vote
          1
          down vote










          up vote
          1
          down vote









          dnf has a transaction history and rollback routines to revert to and/or undo operations.



          Issue sudo dnf history to get a list of transactions, find the transaction that borked the system, then issue either sudo dnf history undo <BorkingTransactionNumber> or sudo dnf history rollback <BorkingTransactionNumber - 1> where <BorkingTransactionNumber> is the number of the transaction that broke your system.



          See man dnf for more information on the history function and other options.






          share|improve this answer












          dnf has a transaction history and rollback routines to revert to and/or undo operations.



          Issue sudo dnf history to get a list of transactions, find the transaction that borked the system, then issue either sudo dnf history undo <BorkingTransactionNumber> or sudo dnf history rollback <BorkingTransactionNumber - 1> where <BorkingTransactionNumber> is the number of the transaction that broke your system.



          See man dnf for more information on the history function and other options.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Sep 25 at 16:14









          Mioriin

          1,664412




          1,664412











          • i tried reinstalling all the packages as described by @telcoM which didn't work out well. Now I have another problem askubuntu.com/questions/1078691/… to solve.
            – Doc
            Sep 26 at 18:49
















          • i tried reinstalling all the packages as described by @telcoM which didn't work out well. Now I have another problem askubuntu.com/questions/1078691/… to solve.
            – Doc
            Sep 26 at 18:49















          i tried reinstalling all the packages as described by @telcoM which didn't work out well. Now I have another problem askubuntu.com/questions/1078691/… to solve.
          – Doc
          Sep 26 at 18:49




          i tried reinstalling all the packages as described by @telcoM which didn't work out well. Now I have another problem askubuntu.com/questions/1078691/… to solve.
          – Doc
          Sep 26 at 18:49

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f470771%2fhow-to-restore-fedora-when-a-terminal-command-removed-everything-and-resulted-in%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay