I copied the apt source directory from /var/cache/apt/archives/ on my laptop (11.10) to my work PC (11.10). I then removed /var/lib/apt/lists/*.

Now when I try to update my pc from the terminal, it shows "Failed to fetch" errors. If f use the Ubuntu update manager to install updates, it says: "waiting for unattended-upgrade to exit", but no update happens. Now it won't update anything.

link|improve this question

75% accept rate
What is apt source directory? Could you be more specific? – enzotib Feb 1 at 7:05
sorry,copy this directory : /var/cache/apt/archives/ and then remove: /var/lib/apt/lists/* and now i can't update anything – Netmoon Feb 7 at 6:55
Why did you remove apt/lists/? Did you follow some instructions, if so link them please. Also we assume your /etc/apt/sources.list are the same on both machines? – Wesley Apr 16 at 8:09
@Wesley: no, just i think this files not same, so i remove destination list file! i'v done that whitout any guide or manual ! – Netmoon Apr 18 at 4:36
feedback

2 Answers

up vote 1 down vote accepted

Go to /var/cache/apt and delete the lock file. Clear the "updates" folder. Thats it.

link|improve this answer
thank you, thats working great. can you explain further about lock file; what is it and how it work? – Netmoon Apr 18 at 4:34
feedback

Are you referring to the '/etc/apt/' directory, with the 'sources.list' file in it? Or the '/var/cache/apt/archives/' directory, where package archives are stored?

Can't really answer your question as to what's wrong without knowing which. If you want to update one machine from the files downloaded by apt-get off another, you're going to need to become familiar with how apt-get structures its package lists and archive files and set up a 'sources.list' file to suit, or use something like apt-mirror.

link|improve this answer
sorry,commented – Netmoon Feb 7 at 6:55
feedback

Your Answer

 
or
required, but never shown

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