after doing all the steps mentioned in
https://help.ubuntu.com/community/PackageManagerTroubleshootingProcedure
ayan@ayan-Lenovo-G460:~$ sudo grep -R proxy /etc/apt/*
[sudo] password for ayan:
ayan@ayan-Lenovo-G460:~$ sudo fuser -vvv /var/lib/dpkg/lock
ayan@ayan-Lenovo-G460:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.10
DISTRIB_CODENAME=quantal
DISTRIB_DESCRIPTION="Ubuntu 12.10"
ayan@ayan-Lenovo-G460:~$ uname -a
Linux ayan-Lenovo-G460 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
ayan@ayan-Lenovo-G460:~$ sudo rm /var/lib/apt/lists/lock
ayan@ayan-Lenovo-G460:~$ sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
ayan@ayan-Lenovo-G460:~$
ayan@ayan-Lenovo-G460:~$ sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
ayan@ayan-Lenovo-G460:~$ sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
ayan@ayan-Lenovo-G460:~$ sudo mv /var/lib/dpkg/available /var/lib/dpkg/available-bad
ayan@ayan-Lenovo-G460:~$ sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
ayan@ayan-Lenovo-G460:~$ sudo rm -rf /var/lib/dpkg/updates/*
ayan@ayan-Lenovo-G460:~$ sudo rm -rf /var/lib/apt/lists
ayan@ayan-Lenovo-G460:~$ sudo rm /var/cache/apt/*.bin
ayan@ayan-Lenovo-G460:~$ sudo mkdir /var/lib/apt/lists
ayan@ayan-Lenovo-G460:~$ sudo mkdir /var/lib/apt/lists/partial
ayan@ayan-Lenovo-G460:~$ LANG=C;sudo apt-get clean
ayan@ayan-Lenovo-G460:~$ LANG=C;sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
ayan@ayan-Lenovo-G460:~$ LANG=C;sudo apt-get --purge autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up telepathy-indicator (0.3.0-0ubuntu3) ...
ayan@ayan-Lenovo-G460:~$ LANG=C;sudo apt-get --purge autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
ayan@ayan-Lenovo-G460:~$
ayan@ayan-Lenovo-G460:~$ LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824Ign http://dl.google.com stable InRelease
Get:1 http://dl.google.com stable Release.gpg [198 B]
Get:2 http://dl.google.com stable Release [1347 B]
Ign http://dl.google.com stable Release
Ign http://ppa.launchpad.net quantal InRelease
Ign http://archive.canonical.com quantal InRelease
Get:3 http://dl.google.com stable/main amd64 Packages [772 B]
Ign http://archive.ubuntu.com quantal InRelease
Ign http://ppa.launchpad.net quantal InRelease
Get:4 http://dl.google.com stable/main i386 Packages [764 B]
Get:5 http://archive.canonical.com quantal Release.gpg [933 B]
Ign http://ppa.launchpad.net quantal InRelease
Ign http://archive.ubuntu.com quantal-updates InRelease
Ign http://deb.opera.com stable InRelease
Get:6 http://archive.canonical.com quantal Release [7078 B]
Ign http://ppa.launchpad.net quantal InRelease
Ign http://archive.ubuntu.com quantal-security InRelease
Get:7 http://deb.opera.com stable Release.gpg [189 B]
Ign http://dl.google.com stable/main Translation-en
Get:8 http://ppa.launchpad.net quantal Release.gpg [316 B]
Get:9 http://archive.canonical.com quantal/partner amd64 Packages [1957 B]
Get:10 http://deb.opera.com stable Release [633 B]
Get:11 http://archive.ubuntu.com quantal Release.gpg [933 B]
Ign http://ppa.launchpad.net quantal Release.gpg
Get:12 http://archive.canonical.com quantal/partner i386 Packages [2754 B]
Get:13 http://deb.opera.com stable/non-free amd64 Packages [792 B]
Get:14 http://archive.ubuntu.com quantal-updates Release.gpg [933 B]
Get:15 http://ppa.launchpad.net quantal Release.gpg [316 B]
Get:16 http://deb.opera.com stable/non-free i386 Packages [802 B]
Get:17 http://ppa.launchpad.net quantal Release.gpg [316 B]
Get:18 http://archive.ubuntu.com quantal-security Release.gpg [198 B]
Get:19 http://ppa.launchpad.net quantal Release [11.9 kB]
Get:20 http://archive.ubuntu.com quantal Release [49.6 kB]
Ign http://ppa.launchpad.net quantal Release
Get:21 http://ppa.launchpad.net quantal Release [11.9 kB]
Ign http://archive.canonical.com quantal/partner Translation-en
Get:22 http://archive.ubuntu.com quantal-updates Release [49.6 kB]
Get:23 http://ppa.launchpad.net quantal Release [11.9 kB]
Get:24 http://ppa.launchpad.net quantal/main amd64 Packages [695 B]
Ign http://deb.opera.com stable/non-free Translation-en
Get:25 http://ppa.launchpad.net quantal/main i386 Packages [695 B]
Get:26 http://archive.ubuntu.com quantal-security Release [49.6 kB]
Get:27 http://archive.ubuntu.com quantal/main Sources [873 kB]
Get:28 http://ppa.launchpad.net quantal/main amd64 Packages [2326 B]
Get:29 http://ppa.launchpad.net quantal/main i386 Packages [2326 B]
Get:30 http://ppa.launchpad.net quantal/main amd64 Packages [2589 B]
Get:31 http://ppa.launchpad.net quantal/main i386 Packages [2562 B]
Ign http://ppa.launchpad.net quantal/main Translation-en
Err http://ppa.launchpad.net quantal/main amd64 Packages
404 Not Found
Err http://ppa.launchpad.net quantal/main i386 Packages
404 Not Found
Ign http://ppa.launchpad.net quantal/main Translation-en
Ign http://ppa.launchpad.net quantal/main Translation-en
Ign http://ppa.launchpad.net quantal/main Translation-en
Get:32 http://archive.ubuntu.com quantal/restricted Sources [5646 B]
Get:33 http://archive.ubuntu.com quantal/universe Sources [5526 kB]
Get:34 http://archive.ubuntu.com quantal/main amd64 Packages [1137 kB]
Get:35 http://archive.ubuntu.com quantal/restricted amd64 Packages [8369 B]
Get:36 http://archive.ubuntu.com quantal/universe amd64 Packages [5286 kB]
Get:37 http://archive.ubuntu.com quantal/main i386 Packages [1135 kB]
Get:38 http://archive.ubuntu.com quantal/restricted i386 Packages [8387 B]
Get:39 http://archive.ubuntu.com quantal/universe i386 Packages [5296 kB]
Get:40 http://archive.ubuntu.com quantal/main Translation-en [660 kB]
Get:41 http://archive.ubuntu.com quantal/restricted Translation-en [2575 B]
Get:42 http://archive.ubuntu.com quantal/universe Translation-en [3656 kB]
Get:43 http://archive.ubuntu.com quantal-updates/main Sources [14 B]
Get:44 http://archive.ubuntu.com quantal-updates/restricted Sources [14 B]
Get:45 http://archive.ubuntu.com quantal-updates/universe Sources [14 B]
Get:46 http://archive.ubuntu.com quantal-updates/main amd64 Packages [14 B]
Get:47 http://archive.ubuntu.com quantal-updates/restricted amd64 Packages [14 B]
Get:48 http://archive.ubuntu.com quantal-updates/universe amd64 Packages [14 B]
Get:49 http://archive.ubuntu.com quantal-updates/main i386 Packages [14 B]
Get:50 http://archive.ubuntu.com quantal-updates/restricted i386 Packages [14 B]
Get:51 http://archive.ubuntu.com quantal-updates/universe i386 Packages [14 B]
Get:52 http://archive.ubuntu.com quantal-updates/main Translation-en [14 B]
Get:53 http://archive.ubuntu.com quantal-updates/restricted Translation-en [14 B]
Get:54 http://archive.ubuntu.com quantal-updates/universe Translation-en [14 B]
Get:55 http://archive.ubuntu.com quantal-security/main Sources [14 B]
Get:56 http://archive.ubuntu.com quantal-security/restricted Sources [14 B]
Get:57 http://archive.ubuntu.com quantal-security/universe Sources [14 B]
Get:58 http://archive.ubuntu.com quantal-security/main amd64 Packages [14 B]
Get:59 http://archive.ubuntu.com quantal-security/restricted amd64 Packages [14 B]
Get:60 http://archive.ubuntu.com quantal-security/universe amd64 Packages [14 B]
Get:61 http://archive.ubuntu.com quantal-security/main i386 Packages [14 B]
Get:62 http://archive.ubuntu.com quantal-security/restricted i386 Packages [14 B]
Get:63 http://archive.ubuntu.com quantal-security/universe i386 Packages [14 B]
Get:64 http://archive.ubuntu.com quantal-security/main Translation-en [14 B]
Get:65 http://archive.ubuntu.com quantal-security/restricted Translation-en [14 B]
Get:66 http://archive.ubuntu.com quantal-security/universe Translation-en [14 B]
Fetched 23.8 MB in 6min 45s (58.7 kB/s)
W: GPG error: http://dl.google.com stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A040830F7FAC5991
W: Failed to fetch http://ppa.launchpad.net/jsevi83/unity/ubuntu/dists/quantal/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://ppa.launchpad.net/jsevi83/unity/ubuntu/dists/quantal/main/binary-i386/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
ayan@ayan-Lenovo-G460:~$ sudo dpkg --configure -a
ayan@ayan-Lenovo-G460:~$ sudo dpkg --clear-avail
ayan@ayan-Lenovo-G460:~$ LANG=C;sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
ayan@ayan-Lenovo-G460:~$ LANG=C;sudo apt-get --fix-missing install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
ayan@ayan-Lenovo-G460:~$ LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824 && sudo apt-get dist-upgrade
Ign http://dl.google.com stable InRelease
Ign http://archive.canonical.com quantal InRelease
Ign http://ppa.launchpad.net quantal InRelease
Get:1 http://dl.google.com stable Release.gpg [198 B]
Ign http://archive.ubuntu.com quantal InRelease
Hit http://dl.google.com stable Release
Ign http://dl.google.com stable Release
Hit http://archive.canonical.com quantal Release.gpg
Ign http://deb.opera.com stable InRelease
Ign http://ppa.launchpad.net quantal InRelease
Ign http://dl.google.com stable/main amd64 Packages/DiffIndex
Ign http://dl.google.com stable/main i386 Packages/DiffIndex
Hit http://archive.canonical.com quantal Release
Ign http://ppa.launchpad.net quantal InRelease
Ign http://archive.ubuntu.com quantal-updates InRelease
Hit http://deb.opera.com stable Release.gpg
Hit http://archive.canonical.com quantal/partner amd64 Packages
Hit http://dl.google.com stable/main amd64 Packages
Ign http://ppa.launchpad.net quantal InRelease
Hit http://deb.opera.com stable Release
Ign http://archive.ubuntu.com quantal-security InRelease
Hit http://dl.google.com stable/main i386 Packages
Hit http://archive.canonical.com quantal/partner i386 Packages
Hit http://ppa.launchpad.net quantal Release.gpg
Get:2 http://archive.ubuntu.com quantal Release.gpg [933 B]
Ign http://ppa.launchpad.net quantal Release.gpg
Ign http://dl.google.com stable/main Translation-en
Hit http://ppa.launchpad.net quantal Release.gpg
Hit http://archive.ubuntu.com quantal-updates Release.gpg
Hit http://ppa.launchpad.net quantal Release.gpg
Hit http://archive.ubuntu.com quantal-security Release.gpg
Hit http://ppa.launchpad.net quantal Release
Get:3 http://archive.ubuntu.com quantal Release [49.6 kB]
Ign http://archive.canonical.com quantal/partner Translation-en
Ign http://ppa.launchpad.net quantal Release
Hit http://deb.opera.com stable/non-free amd64 Packages
Hit http://ppa.launchpad.net quantal Release
Hit http://deb.opera.com stable/non-free i386 Packages
Hit http://ppa.launchpad.net quantal Release
Hit http://ppa.launchpad.net quantal/main amd64 Packages
Hit http://archive.ubuntu.com quantal-updates Release
Hit http://ppa.launchpad.net quantal/main i386 Packages
Hit http://archive.ubuntu.com quantal-security Release
Get:4 http://archive.ubuntu.com quantal/main Sources [873 kB]
Hit http://ppa.launchpad.net quantal/main amd64 Packages
Hit http://ppa.launchpad.net quantal/main i386 Packages
Hit http://ppa.launchpad.net quantal/main amd64 Packages
Hit http://ppa.launchpad.net quantal/main i386 Packages
Ign http://deb.opera.com stable/non-free Translation-en
Ign http://ppa.launchpad.net quantal/main Translation-en
Err http://ppa.launchpad.net quantal/main amd64 Packages
404 Not Found
Err http://ppa.launchpad.net quantal/main i386 Packages
404 Not Found
Ign http://ppa.launchpad.net quantal/main Translation-en
Get:5 http://archive.ubuntu.com quantal/restricted Sources [5646 B]
Ign http://ppa.launchpad.net quantal/main Translation-en
Get:6 http://archive.ubuntu.com quantal/universe Sources [5526 kB]
Ign http://ppa.launchpad.net quantal/main Translation-en
Get:7 http://archive.ubuntu.com quantal/main amd64 Packages [1137 kB]
Get:8 http://archive.ubuntu.com quantal/restricted amd64 Packages [8369 B]
Get:9 http://archive.ubuntu.com quantal/universe amd64 Packages [5286 kB]
Get:10 http://archive.ubuntu.com quantal/main i386 Packages [1135 kB]
Get:11 http://archive.ubuntu.com quantal/restricted i386 Packages [8387 B]
Get:12 http://archive.ubuntu.com quantal/universe i386 Packages [5296 kB]
Hit http://archive.ubuntu.com quantal/main Translation-en
Hit http://archive.ubuntu.com quantal/restricted Translation-en
Hit http://archive.ubuntu.com quantal/universe Translation-en
Hit http://archive.ubuntu.com quantal-updates/main Sources
Hit http://archive.ubuntu.com quantal-updates/restricted Sources
Hit http://archive.ubuntu.com quantal-updates/universe Sources
Hit http://archive.ubuntu.com quantal-updates/main amd64 Packages
Hit http://archive.ubuntu.com quantal-updates/restricted amd64 Packages
Hit http://archive.ubuntu.com quantal-updates/universe amd64 Packages
Hit http://archive.ubuntu.com quantal-updates/main i386 Packages
Hit http://archive.ubuntu.com quantal-updates/restricted i386 Packages
Hit http://archive.ubuntu.com quantal-updates/universe i386 Packages
Hit http://archive.ubuntu.com quantal-updates/main Translation-en
Hit http://archive.ubuntu.com quantal-updates/restricted Translation-en
Hit http://archive.ubuntu.com quantal-updates/universe Translation-en
Hit http://archive.ubuntu.com quantal-security/main Sources
Hit http://archive.ubuntu.com quantal-security/restricted Sources
Hit http://archive.ubuntu.com quantal-security/universe Sources
Hit http://archive.ubuntu.com quantal-security/main amd64 Packages
Hit http://archive.ubuntu.com quantal-security/restricted amd64 Packages
Hit http://archive.ubuntu.com quantal-security/universe amd64 Packages
Hit http://archive.ubuntu.com quantal-security/main i386 Packages
Hit http://archive.ubuntu.com quantal-security/restricted i386 Packages
Hit http://archive.ubuntu.com quantal-security/universe i386 Packages
Hit http://archive.ubuntu.com quantal-security/main Translation-en
Hit http://archive.ubuntu.com quantal-security/restricted Translation-en
Hit http://archive.ubuntu.com quantal-security/universe Translation-en
Fetched 19.3 MB in 5min 42s (56.5 kB/s)
W: GPG error: http://dl.google.com stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A040830F7FAC5991
W: Failed to fetch http://ppa.launchpad.net/jsevi83/unity/ubuntu/dists/quantal/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://ppa.launchpad.net/jsevi83/unity/ubuntu/dists/quantal/main/binary-i386/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
ayan@ayan-Lenovo-G460:~$ find /etc/apt -name '*.list' -exec bash -c 'echo -e "\n$1\n"; cat -n "$1"' _ '{}' \;
/etc/apt/sources.list.d/cairo-dock-team-ppa-quantal.list
/etc/apt/sources.list.d/atareao-lenses-quantal.list
1 deb http://ppa.launchpad.net/atareao/lenses/ubuntu quantal main
2 # deb-src http://ppa.launchpad.net/atareao/lenses/ubuntu quantal main
/etc/apt/sources.list.d/cooperjona-stormcloud-quantal.list
/etc/apt/sources.list.d/scopes-packagers-adult-scopes-quantal.list
/etc/apt/sources.list.d/ubuntu-wine-ppa-quantal.list
1 deb http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu quantal main
2 # deb-src http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu quantal main
/etc/apt/sources.list.d/opera.list
1 # This file makes sure that Opera Browser is kept up-to-date
2 # as part of regular system upgrades
3
4 deb http://deb.opera.com/opera/ stable non-free #Opera Browser (final releases)
5
6 # The line above will make sure you get all final public releases.
7 # Uncomment the following line if you want to get alpha and beta
8 # releases, too.
9
10 # deb http://deb.opera.com/opera-beta/ stable non-free #Opera Browser (beta releases)
/etc/apt/sources.list.d/google-talkplugin.list
1 ### THIS FILE IS AUTOMATICALLY CONFIGURED ###
2 # You may comment out this entry, but any other modifications may be lost.
3 deb http://dl.google.com/linux/talkplugin/deb/ stable main
/etc/apt/sources.list.d/jsevi83-unity-quantal.list
1 deb http://ppa.launchpad.net/jsevi83/unity/ubuntu quantal main
2 # deb-src http://ppa.launchpad.net/jsevi83/unity/ubuntu quantal main
/etc/apt/sources.list.d/scopes-packagers-ppa-quantal.list
1 deb http://ppa.launchpad.net/scopes-packagers/ppa/ubuntu quantal main
2 # deb-src http://ppa.launchpad.net/scopes-packagers/ppa/ubuntu quantal main
/etc/apt/sources.list.d/skype-wrapper-ppa-quantal.list
/etc/apt/sources.list.d/weather-indicator-team-ppa-quantal.list
/etc/apt/sources.list
1 # deb cdrom:[Ubuntu 12.10 _Quantal Quetzal_ - Alpha amd64 (20120905.2)]/ dists/quantal/main/binary-i386/
2
3 # deb cdrom:[Ubuntu 12.10 _Quantal Quetzal_ - Alpha amd64 (20120905.2)]/ dists/quantal/restricted/binary-i386/
4 # deb cdrom:[Ubuntu 12.10 _Quantal Quetzal_ - Alpha amd64 (20120905.2)]/ quantal main restricted
5
6 # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
7 # newer versions of the distribution.
8 deb http://archive.ubuntu.com/ubuntu quantal main restricted
9 deb-src http://archive.ubuntu.com/ubuntu quantal main restricted
10
11 ## Major bug fix updates produced after the final release of the
12 ## distribution.
13 deb http://archive.ubuntu.com/ubuntu quantal-updates main restricted
14 deb-src http://archive.ubuntu.com/ubuntu quantal-updates main restricted
15
16 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
17 ## team. Also, please note that software in universe WILL NOT receive any
18 ## review or updates from the Ubuntu security team.
19 deb http://archive.ubuntu.com/ubuntu quantal universe
20 deb-src http://archive.ubuntu.com/ubuntu quantal universe
21 deb http://archive.ubuntu.com/ubuntu quantal-updates universe
22 deb-src http://archive.ubuntu.com/ubuntu quantal-updates universe
23
24 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
25 ## team, and may not be under a free licence. Please satisfy yourself as to
26 ## your rights to use the software. Also, please note that software in
27 ## multiverse WILL NOT receive any review or updates from the Ubuntu
28 ## security team.
29
30 ## N.B. software from this repository may not have been tested as
31 ## extensively as that contained in the main release, although it includes
32 ## newer versions of some applications which may provide useful features.
33 ## Also, please note that software in backports WILL NOT receive any review
34 ## or updates from the Ubuntu security team.
35
36 deb http://archive.ubuntu.com/ubuntu quantal-security main restricted
37 deb-src http://archive.ubuntu.com/ubuntu quantal-security main restricted
38 deb http://archive.ubuntu.com/ubuntu quantal-security universe
39 deb-src http://archive.ubuntu.com/ubuntu quantal-security universe
40
41 ## Uncomment the following two lines to add software from Canonical's
42 ## 'partner' repository.
43 ## This software is not part of Ubuntu, but is offered by Canonical and the
44 ## respective vendors as a service to Ubuntu users.
45 deb http://archive.canonical.com/ubuntu quantal partner
46 # deb-src http://archive.canonical.com/ubuntu quantal partner
47
48 ## This software is not part of Ubuntu, but is offered by third-party
49 ## developers who want to ship their latest software.
50 # deb http://extras.ubuntu.com/ubuntu quantal main
51 # deb-src http://extras.ubuntu.com/ubuntu quantal main
ayan@ayan-Lenovo-G460:~$