How To Repair Ubuntu Packages
We oftentimes came across some faulty errors and faced some serious system issues like a broken Operating organisation. We are only left with a black screen, and information technology seems like the ultimate prepare will be to reinstall the Operating organisation. That is not the just solution; we can set up a broken Operating system without reinstalling it using some dissimilar techniques that nosotros are going to perform in this article. Reinstalling a whole Operating system is not a adept option considering it may lead to data loss of all of import files and folders.
Fixing process
If you came across the error something like, 'Could not get lock /var/lib/apt/lists/lock' or 'Could not get lock /var/lib/dpkg/lock', then you tin fix this broken issue by post-obit the step by pace guide provided below:
Step 1: Login from Live CD or bootable USB
First of all, sign in using the live CD or bootable USB drive, and back upward your data in some external hard drive and then that you can save it somewhere else and reinstall the operating system if needed.
Step 2: Remove the lock files
Open tty1 using the keyboard shortcut keys CTRL + ALT + F1, and type the commands provided beneath to remove the lock files.
If your error is 'Could non get lock /var/lib/apt/lists/lock', so blazon the control:
$ sudo rm /var/lib/apt/lists/lock
If your mistake is 'Could non get lock /var/lib/dpkg/lock', so type the command:
$ sudo rm /var/lib/dpkg/lock
Along with the lock files, remove the lock-frontend file besides using the command:
$ sudo rm /var/lib/dpkg/lock-front-end
If you lot have broken apt-cache too, and then blazon the command:
$ sudo rm /var/enshroud/apt/archives/lock
Subsequently removing the lock files, Reconfigure the dpkg.
Step 3: Reconfigure dpkg
To reconfigure all the packages installed, blazon the command provided below;
$ sudo dpkg --configure -a
Footstep 4: Clean local repository
To clear out all the local repository, type the command given below:
Step five: update all the packages
After clearing the local repository, update the installed packages with the –fix-missing choice.
$ sudo apt update --fix-missing
Pace 6: install all broken packages and dependencies
Now, force the packet director to install all the cleaved packages or missing dependencies using the control provided beneath:
After installing the broken packages and missing dependencies, reconfigure dpkg one time once more using the command:
$ sudo dpkg --configure -a
Upgrade the system'due south packages:
Upgrade the dependencies as well using the dist-upgrade command:
Pace 7: Reboot the system
Subsequently fixing everything upward, restart eh organisation using the control provided below:
Once you accept followed all the steps given above, everything will exist back in gild and work smoothly.
Determination
This mail service gives a brief and in-detail solution on how to fix broken Ubuntu twenty.04 without reinstalling it. After post-obit all the steps provided in this mail service, you tin save the reinstallation time and get back to the real piece of work in a couple of minutes.
How To Repair Ubuntu Packages,
Source: https://linuxhint.com/fix-broken-ubuntu-without-reinstalling/
Posted by: baileyfordell.blogspot.com
0 Response to "How To Repair Ubuntu Packages"
Post a Comment