apt-get 403 Forbidden

I've start a new job today and I am trying to set up my machine to run through their Windows server.

I've managed to get a internet connection through the server now but now I can't run apt-get update as I get a "403 Forbidden" error.

This is for every repo under my source list, apart from translations(?).

I do have a proxy in apt.conf, if I don't have it I get a 407 Permission Denied error.

Here's my apt.conf file (I have omitted my username and password)

Acquire::http::proxy "";

Here's my sources.list

#deb cdrom:[Ubuntu 12.04.2 LTS _Precise Pangolin_ - Release amd64 (20130213)]/ dists/precise/main/binary-i386/
#deb cdrom:[Ubuntu 12.04.2 LTS _Precise Pangolin_ - Release amd64 (20130213)]/ dists/precise/restricted/binary-i386/
#deb cdrom:[Ubuntu 12.04.2 LTS _Precise Pangolin_ - Release amd64 (20130213)]/ precise main restricted
# See for how to upgrade to
# newer versions of the distribution.
deb precise main restricted
deb-src precise main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb precise-updates main restricted
deb-src precise-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb precise universe
deb-src precise universe
deb precise-updates universe
deb-src precise-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb precise multiverse
deb-src precise multiverse
deb precise-updates multiverse
deb-src precise-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb precise-backports main restricted universe multiverse
deb-src precise-backports main restricted universe multiverse
deb precise-security main restricted
deb-src precise-security main restricted
deb precise-security universe
deb-src precise-security universe
deb precise-security multiverse
deb-src precise-security multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb precise partner
# deb-src precise partner
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb precise main
deb-src precise main

I can sort-of fix this by changing all the http in sources.list to ftp but I still have issues with ppas

3 Answers

This error is due to server and it is completely not your fault. Could be because of that repository was offline for maintenance.

However, you should try again later or/and I would suggest reverting to other country's server instead of the main archive.ubuntu.com, which is throttled and will not allow to experience full speed.

Choose server udate

3

Look at the top two answers from:

how to install packages with apt-get on a system connected via proxy?


What do you get when you try?:

sudo http_proxy=' apt-get update

I have often experience this error, even when using main server.I noticed that this happens when apt-get process breaks for some reason. For instance when running apt-get update downloading of some file coudn't be completed. You will there after get 403 error for that particular file.

I learned that these partially downloaded files (I am not sure if they are exactly the files) during apt-get update are stored in /var/lib/apt/lists/partial/

So I didsudo rm -r /var/lib/apt/lists/partial/*(deleted all files in the directory)

After this I din't get the 403 error.

If you are getting the error when running apt-get install or apt-get upgrade or apt-get dist-upgrade

try sudo rm -r /var/cache/apt/archives/partial/*

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like