64

I have a black screen on my PC, and I've somehow got in the terminal the terminal is all black and I can only do commands.

Is there a command to factory reset your PC through the terminal?

Zanna
  • 70,465
  • 5
    Looks like you are encountering the xy problem: https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem Isn't your main problem the black screen? If yes then you should ask about how to fix the black screen, because you might find very simple (maybe just 1 command) answers. – Tooniis Aug 14 '17 at 07:40
  • 1
    This blog talks about a software which can reset Ubuntu to factory default I have not tried, but definitely worth a peek http://www.omgubuntu.co.uk/2017/03/reset-ubuntu-desktop-default-settings – user227495 Mar 31 '17 at 19:46

3 Answers3

68

Follow these steps:

  1. Try configuring unconfigured packages:

    sudo dpkg --configure -a
    
  2. Update the contents of the repositories

    sudo apt-get update
    
  3. Try to fix missing dependencies:

    sudo apt-get -f install
    
  4. Update all packages with new versions available:

    sudo apt-get full-upgrade
    
  5. Reinstall Ubuntu desktop:

    sudo apt-get install --reinstall ubuntu-desktop
    
  6. Remove unnecessary packages:

    sudo apt-get autoremove
    
  7. Delete downloaded packages already installed:

    sudo apt-get clean
    
  8. Reboot the system to see if the issue was resolved:

    sudo reboot
    
kyodake
  • 15,401
19

There is no such thing as factory reset in ubuntu. You have to run a live disk/usb drive of any linux distro and backup your data and then reinstall ubuntu.

anonymous2
  • 4,298
15

You can use :

dconf reset -f /

Running this command will reset, among other things: the apps pinned to the Unity launcher or Ubuntu Dock ; panel applets and/or indicators; monitor resolution and interface scaling; keyboard shortcuts; fonts, GTK and icon theme; window button placement, launcher behaviour; and so on.

This command will also reset any application that uses dconf to store its settings. This includes core desktop apps like Rhythmbox, Evince, Shotwell and Nautilus.

This latter point is important to keep in mind as this command may reset library settings, delete accounts, disable plugins, and/or require you to re-authenticate with online services.

On the flip it means this command is the perfect one to run when you want to reset GNOME 3 settings.

muru
  • 197,895
  • 55
  • 485
  • 740
An0n
  • 2,119