Ubuntu Add/remove and synaptic very rarely panic your system because of broken dependencies. It happens mostly because of using third party packages or install a package using “force” options. Some time you can’t remove your broken package with synaptic. It shows an Error like
dpkg return error :post installation script
or
dpkg return error : post installation script return an error
or
Subprocess post-installation script returned error
This tweak is very handy in such situations. it is very simple
1. press Alt + F2 and type “gksu nautilus” (without quatos)
2. Type password …it open super user enabled nautilus
3. go to /var/lib/dpkg/info in nautilus
4. Delete all files related your broken package (if your broken package is cgmail delete all package related to cgmail)
5. done ….. open synaptic now and remove broken package
NB : before deleting any system file just backup it.
……………………………………………………………………………………………………………………………………………………………………………………