Every time I try to install ANYTHING with apt-get,i get this error

E: Waited for /usr/sbin/dpkg-preconfigure --apt || true but it wasn't there     
E: Failure running script /usr/sbin/dpkg-preconfigure --apt || true 

I have looked at many forums but none of them seem to have any answer.

Any help would be much appreciated at this time!

(everything must be done via command line, 13.04 server)

Tried Braiam's command, this was the output + command:

sudo sh -c "echo 'DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-pr
econfigure --apt || true";};' >> /etc/apt/apt.conf.d/70debconf"                 
[sudo] password for swech:                                                      
--apt: 1: --apt: Syntax error: Unterminated quoted string                       
-bash: true;};' >> /etc/apt/apt.conf.d/70debconf: No such file or directory  

2 Answers 2


This means that you somehow screwed up your configuration scripts, the reason why is happening is because DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt || true";}; doesn't exist in your scripts so you may have to create it:

sudo sh -c "echo 'DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt || true";};' >> /etc/apt/apt.conf.d/70debconf"

Then try again.

  • Output in question, new edit. Dec 5, 2013 at 22:20
  • @HairTriggerHosting you sure you copy/pasted correctly?
    – Braiam
    Dec 5, 2013 at 22:27
  • pasted fine, although I got the error, apt seems to be working just fine. I am getting an error after installation tho, again with dpkg.askubuntu.com/questions/386762/… Dec 5, 2013 at 23:10


sudo apt-get update && sudo apt-get -f install

then see if error prompts.

  • command fails, I don't think the problem lies with apt. Dec 5, 2013 at 22:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.