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

Re: replicating an installation baseline only (as if it had been a cummulative, virgin installation) ...



On Tue 14 May 2019 at 13:30:12 (+0200), Albretch Mueller wrote:
>  My question may not have been clear enough on my previous post about
> reinstalling debian, but I think I have a better idea about how to
> solve many of my problems.
> 
>  I have an installation based on:
> 
> $ uname -a
> Linux niggahme 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1
> (2018-05-07) x86_64 GNU/Linux
> 
> which I have customized and I am quite happy about. So, I would like
> to replicate onto another disk  just the baseline without browser
> "history", altered configuration files or any such things. As if I had
> installed Debian afresh.

This paragraph seems to show some confusion between the Debian
installation itself and the system you built upon it.

> As if I had installed Debian afresh.

That's relatively easy and can be done at two levels: with dpkg
using --get-selections and --set-selections, or with apt using
$ dpkg-query -W --showformat '${Package}\n'
to generate the list of installed packages.
('${Package}\n', note the quotes, is for dpkg-query, not for
substitution by the shell.)

>  As you code and access the Internet, you install and remove packages

Or if you hang onto your /var/log/apt/history* logs rather than
letting them be purged, you can reconstruct a clean copy of the system
that way. That makes it easier to prune packages you installed and
then removed as not wanted after all.

> just the baseline without browser
> "history", altered configuration files or any such things.

>  As you code and access the Internet, you install and remove packages
> and all sorts of "cookies" ... are being use to monitor, as well as
> JavaScript and all kinds of nonsense to hack into your computer.
> 
>  After doing whatever I needed to do, I would like -to replicate just
> the baseline- of my exposed computer, as if I had never accessed the
> Internet with it. Of course, you can't simply copy the files.

Assuming you're not browsing as root, you're now talking about files
in your own home directory, most (?all) of them being dotfiles, and
there's a lot more difficulty "preening" those. Perhaps the simplest
way if to just move them all out, with the exception of the files
you probably wrote entirely yourself, like .bashrc, .inputrc, .less,
.xsession, .ssh/* and certain .config/* files.

I suspect that that's a lot more difficult to unpick if you run a
DE because it's not obvious which files belong to what.

Cheers,
David.


Reply to: