Ubuntu: How can I fix dpkg after my system ran out of space?



Question:

I was installing LibreOffice on my Ubuntu phone when it ran out of space (sudo apt-get install libreoffice). When I attempt to purge what was installed of LibreOffice (sudo apt-get purge libreoffice), I am presented with the message

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.  

When I run sudo dpkg --configure -a, I am presented with the following error:

dpkg: error: failed to write status database record about 'iputils-ping' to '/var/lib/dpkg/status': No space left on device  

How should I proceed? I am trying to purge LibreOffice precisely to address this lack of space. Are there some LibreOffice package/system files I can remove manually to make enough space for the dpkg purge to actually run?


Solution:1

I have face this out of space issues several times. This is how i solve it. Usually apt-get create some cache which holds some space on the computer. So I clean the cache, then I get some space back for the system to use to run other other process. This is the reason I don't regularly clean cache. So this is my trick

$ sudo apt-get clean; sudo apt-get autoclean

You can then purge libreoffice afterwards.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »