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 started facing this sudden issue a few days ago when I was once trying to 'update' and 'upgrade', something regarding corruption of package index files in the apt-repository and I've not been able to figure this out; here, following is the output on the command line:

$ sudo apt-get upgrade
[sudo] password for adarshc: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages have been kept back:
  linux-headers-generic-lts-raring linux-image-generic-lts-raring
The following packages will be upgraded:
  accountsservice apt apt-transport-https apt-utils avahi-autoipd avahi-daemon avahi-utils base-files bc bind9-host chromium-browser
  chromium-browser-l10n chromium-codecs-ffmpeg consolekit dc dnsutils duplicity firefox firefox-locale-en flashplugin-installer fonts-opensymbol gdm
  gir1.2-accountsservice-1.0 gir1.2-appindicator3-0.1 gir1.2-gtk-3.0 gnome-control-center gnome-control-center-data gnome-desktop3-data
  gnome-tweak-tool gnupg gpgv grub-common grub-pc grub-pc-bin grub2-common iproute landscape-client-ui-install language-pack-en
  language-pack-en-base language-pack-gnome-en language-pack-gnome-en-base libaccountsservice0 libappindicator1 libappindicator3-1 libapt-inst1.4
  libapt-pkg4.12 libavahi-client3 libavahi-common-data libavahi-common3 libavahi-core7 libavahi-glib1 libavahi-gobject0 libavahi-ui-gtk3-0
  libbind9-80 libcec2 libck-connector0 libcurl3 libcurl3-gnutls libcurl3-nss libdjvulibre-text libdjvulibre21 libdns81 libdrm-intel1
  libdrm-nouveau1a libdrm-nouveau2 libdrm-radeon1 libdrm2 libgail-3-0 libglu1-mesa libgnome-control-center1 libgnome-desktop-3-2 libgtk-3-0
  libgtk-3-bin libgtk-3-common libisc83 libisccc80 libisccfg82 libjpeg-turbo8 liblwres80 libnfs1 libnss3 libnss3-1d libpam-ck-connector
  libpixman-1-0 libqt4-dbus libqt4-declarative libqt4-network libqt4-opengl libqt4-script libqt4-sql libqt4-sql-sqlite libqt4-svg libqt4-xml
  libqt4-xmlpatterns libqtcore4 libqtgui4 libreoffice-base-core libreoffice-calc libreoffice-common libreoffice-core libreoffice-draw
  libreoffice-emailmerge libreoffice-gnome libreoffice-gtk libreoffice-help-en-us libreoffice-impress libreoffice-math libreoffice-style-human
  libreoffice-style-tango libreoffice-writer libsmbclient libssl1.0.0 libunity-2d-private0 libunity-core-5.0-5 libwbclient0 libxfixes3 libxfont1
  libxi6 linux-firmware linux-generic-lts-raring linux-libc-dev openssl pm-utils python-appindicator python-software-properties python-uno qdbus rar
  rsyslog samba-common samba-common-bin smbclient software-center software-properties-common software-properties-gtk thunderbird
  thunderbird-globalmenu thunderbird-gnome-support ubuntu-tweak unity unity-2d unity-2d-common unity-2d-panel unity-2d-shell unity-2d-spread
  unity-common unity-services uno-libs3 ure xbmc-bin xbmc-pvr-argustv xbmc-pvr-dvbviewer xbmc-pvr-mediaportal-tvserver xbmc-pvr-mythtv-cmyth
  xbmc-pvr-nextpvr xbmc-pvr-njoy xbmc-pvr-tvheadend-hts xbmc-pvr-vdr-vnsi xbmc-pvr-vuplus
159 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
E: The package index files are corrupted. No Filename: field for package gnome-tweak-tool.
share|improve this question
1  
for the error in the last line, see this question, it had the same issue, the first answer should help you remove the corrupted index files.....askubuntu.com/q/93114/65969 –  TrailRider Jan 18 at 17:21

2 Answers 2

here are the steps that should fix your problem.

This will clean out downloaded archives

sudo apt-get clean

This will check for the latest packages and updates available

sudo apt-get update

This will push apt to update all available packages

sudo apt-get dist-upgrade

Hope this helps!

share|improve this answer
    
I tried the above, but sorry, it doesn't work and gives the same error message: "E: The package index files are corrupted. No Filename: field for package gnome-tweak-tool." –  Adarsh Chauhan Jan 18 at 16:40
    
@user237254 Does are these command lines good to be used just for maintenance, not only to fix something (like in Adarsh's case)? I mean, to use them to prevent, not to treat, sort to speak... –  Cristiana Nicolae Jan 18 at 19:00
    
@AdarshChauhan, did you change something in your /etc/apt/sources.list file? That can throw errors as well. Usually when I see a response about a corrupt package I just run apt-get clean and it cures it. Only other one that I use is apt-get autoclean but I believe autoclean is for removing old unused packages while clean dumps all your current apt cache. Try and verify you can access the package with this: sudo apt-cache search gnome-tweak-tool If you can, then try doing a: sudo apt-get install gnome-tweak-tool If that works and you still can't get upgrade to work....... hmm..... –  SierraJuliet Jan 18 at 22:54
1  
@CristianaNicolae, I use these in my toolbox for both maintenance and troubleshooting. It has saved me countless hours of beating my head against the wall when I couldn't figure out why some packages were being held back, or when I would get a corrupt package, etc. I usually apt-get update a few times a week and dist-upgrade or upgrade as necessary. Hope that helps you! –  SierraJuliet Jan 18 at 22:56
    
Thank you, @SierraJuliet for the follow up. But, unfortunately, it is still not working it seems. It seems that there is no package index file named 'gnome-tweak-tool' in the apt-repository list and cleaning it, and building it up again gives the following as the last line in the terminal: "E: Some index files failed to download. They have been ignored, or old ones used instead." I would appreciate if any of your past relevant experience can help. –  Adarsh Chauhan Jan 21 at 19:23

Maybe do this first:

sudo apt-get update
share|improve this answer
    
Pardon, I forgot to mention that I already tried upgrading after doing the 'sudo apt-get update'. –  Adarsh Chauhan Jan 18 at 16:33

Your Answer

 
discard

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.