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 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.

share|improve this question
    
What is apt source directory? Could you be more specific? –  enzotib Feb 1 '12 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 '12 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? –  invert Apr 16 '12 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 '12 at 4:36

2 Answers 2

up vote 1 down vote accepted

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

share|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 '12 at 4:34

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.

share|improve this answer
    
sorry,commented –  Netmoon Feb 7 '12 at 6:55

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.