While doing an upgrade on your Debian or Ubuntu system, if you ever encounter the following error message:

E: Unable to parse package file /var/lib/apt/extended_states (1)

all you need to do is to rename that file to something else. For example:

# cd /var/lib/apt/
# mv extended_states extended_states.tmp

Now you can continue whatever you were doing with apt-get, aptitude or synaptic. Although I recommend before proceeding with your normal operation do the following first:

# dpkg --configure -a
# apt-get -f install

Once you perform your upgrade or whatever you were trying to do successfully, you can simply delete the temporary file that we created initially.

# rm extended_states.tmp

That’s it!

Be Sociable, Share!