I realize that this may be a duplicate question but it seems like dpkg is returning error (2) for multiple different reasons. When trying to update and upgrade packages I am returned with:
dpkg: error: parsing file '/var/lib/dpkg/status' near line 50819 package 'openssh-client':
value for 'Conffiles' field has malformatted line '/etc/ssh/moduli'
E: Sub-process /usr/bin/dpkg returned an error code (2)
I have tried multiple things from different questions of the same nature and they have yielded no results, any thoughts?
The configuration file of
openssh
are corrupted, you have to remove it and reinstall.Use
sudo apt-get purge
instead ofsudo apt-get remove
.You can find more information about this here: What is the Difference Between `apt-get purge` and `apt-get remove`?