Is there a command to factory reset Ubuntu? [duplicate]

Solution 1:

Try configuring unconfigured packages:

sudo dpkg --configure -a

Update the contents of the repositories

sudo apt-get update

Try to fix missing dependencies:

sudo apt-get -f install

Update all packages with new versions available:

sudo apt-get full-upgrade

Reinstall Ubuntu desktop:

sudo apt-get install --reinstall ubuntu-desktop

Remove unnecessary packages:

sudo apt-get autoremove

Delete downloaded packages already installed:

sudo apt-get clean

Reboot the system to see if the issue was resolved:

sudo reboot

Solution 2:

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.