On the broken packages, will corrected by synaptic or aptget
sudo apt-get install $APTGET_OPTIONS -f

But in the case that installed bad package 
containning invalid script or like, apt-get 
does not install/remove packages if the script error are solved.
In this case, will delete package info related to this
http://ubuntuforums.org/archive/index.php/t-160331.html

Backup package info file
sudo cp /var/lib/dpkg/status /var/lib/dpkg/status.backup

Edit the package info file
sudo gedit /var/lib/dpkg/status

Search for status "half-installed" and "half-configured"
(or the bad package by name)
If the package are working correctly, will change
Status: install ok half-installed
or
Status: install ok half-configured
to 
Status: install ok installed

If not, remove package info for these packages.
In this case, need to keep blank line between package info 
(do not delete blank lines).

run apt-get to fix broken dependences
sudo apt-get -f install

