Re: a simple script for restoring downloaded debs
Jörg-Volker Peetz wrote:
>> the other night i accidentally deleted the debs i
>> normally keep in the /var/cache/apt/archives directory
>> and while i do keep a backup of them in another
>> directory it is along with all the previous versions
>> too, so it isn't as easy as just copying them.
>> instead i have to figure out which is the installed
>> version (because that is the one i am most interested
>> in having in there in case i do have to do a reinstall).
> Why not copy all files back and order something like "apt-get autoclean" to get
> rid of the older packages?
it's a rather huge archive (i think about 18000
debs), but yes that would be another way of doing
it. i think the flaw is that you would lose the
local, obsolete or debs from unofficial sources
that you no longer keep in the sources.list (but
i would have to verify this).
the script looks to have gotten the job mostly
done. i've added a bit to copy my local, obsolete
and unofficial debs back from another archive and
i think what remains are those debs that i somehow
missed archiving. sometimes i have to get files
via the library and USB stick.