[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
>=2E..=20
>>   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
2377
me@ant(8)~$ dpkg -l | egrep "^ii  " | wc -l
2377
me@ant(9)~$ dpkg -l | egrep "^ii  " | wc -c
331166
me@ant(10)~$ dpkg-query -l | egrep "^ii  " | wc -c
331166
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,


  songbird


Reply to: