[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: a simple script for restoring downloaded debs

Andrei POPESCU wrote:
>songbird wrote:
>>   the other night i accidentally deleted the debs i
>> normally keep in the /var/cache/apt/archives directory
>>   so here is round 1 of the script (which gets 90% of
>> the packages back for me from my backup archive at
>> /myarchive/debian/jessie).=20
> A few suggestions:
> - to find packages you might want to use dpkg-query instead of parsing=20
>   the output of 'dpkg -l'

  hmm, looked at:

me@ant(7)~$ dpkg-query -l | egrep "^ii  " | wc -l
me@ant(8)~$ dpkg -l | egrep "^ii  " | wc -l
me@ant(9)~$ dpkg -l | egrep "^ii  " | wc -c
me@ant(10)~$ dpkg-query -l | egrep "^ii  " | wc -c
me@ant(11)~$ dpkg-query -l | egrep "^ii  " > aa
me@ant(12)~$ dpkg -l | egrep "^ii  " > bb
me@ant(13)~$ diff aa bb

  no difference between those lists...

> - to download the .deb if not available in your backup you could use=20
>   something like 'aptitude reinstall --download-only'

  yes, i am aware of those options if needed, so far
i'm just trying to repopulate from the local archive
as much as possible before downloading anything again.
on this connection it can take quite a while to get
some of the larger debs.  using debdelta saves me 
quite a bit sometimes.

  getting there...  :)

  thanks for your reply, cheers,


Reply to: