Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have created a deb package abc.deb which successfully installs one application (web-server) when all dependencies (like python-dev, python-pip, etc) specified in Depends: <list of dependensies> parameter of control file provided to equivs-build tool. But when dependencies are not matched, I get an error

dpkg: dependency problems prevent configuration of abc:
abc depends on python-mysql; however:
    Package python-mysql is not installed.

The problem here is: after such unsuccessful installation, when I try to use apt-get install for other packages I get an error as :

The following packages have unmet dependencies:
abc : Depends: python-mysql but it is not installable
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

How and where can I catch this dependency error and how can I then remove the apt-get cache (Note : I can't use dpkg -r abc as dpkg would already be running).

share|improve this question
Note : I can't use dpkg -r abc as dpkg would already be running, Where? –  Avinash Raj Apr 7 '14 at 14:31
Hi @Avinash, I meant to say that I can't use dpkg -r abc.deb in any script file (e.g. postinst or postrm) while my current deb installation is going on. Please correct me if I am missing something very imp here. –  Sangram Apr 7 '14 at 14:37
you said, that you get an dependency error while installing that .deb file. You can't remove a paackage by dpkg -r abc.deb command, it's dpkg -r package-name –  Avinash Raj Apr 7 '14 at 14:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.