Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to configure some proxies for a guest virtual machine and now I'm getting:

sudo apt-get update
E: Syntax error /etc/apt/apt.conf.d/95proxy:4: Extra junk at end of file

The content of the file is:

cat /etc/apt/apt.conf.d/95proxy 

Acquire::http::proxy  ""
Acquire::ftp::proxy ""
Acquire::https::proxy ""
share|improve this question
up vote 19 down vote accepted

The problem was that I wasn't setting up the end semicolon for the configuration file. It should look like this:

Acquire::http::proxy  "";
Acquire::ftp::proxy "";
Acquire::https::proxy "";

Reading the man page:

Each line is of the form APT::Get::Assume-Yes "true";. The quotation marks and trailing semicolon are required.

In case of multiple lines using scopes with curly brakes it should looks:

  Get {
    Assume-Yes "true";
    Fix-Broken "true";
share|improve this answer
"curly brakes"? Surely you mean "wiggly parentheses" – joeytwiddle Sep 20 '13 at 18:23
@joeytwiddle I meant hammered parentheses, but then it wouldn't make sense... – Braiam Sep 20 '13 at 18:44
This can also happen if you use "single quote" instead of "double quote". Just happened to me. – ram Jul 10 '15 at 10:42

Your Answer


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

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