Page 1 of 1

Restore snapshot or unistall packages for undo devs

Posted: 2020-09-01 15:02
by bester69
Hi,
How do you do when you need to build an application and it make you to install dozens of devs packages.. that you want to get rif of later.

Since I use btrfs I hardly ever unistall anything.. just use rollback snapshot sytem to prevent leave any unfit package forgotten... but i wondered if you dont consider that's a properly way to proceed...or you do the same thing?

Re: Restore snapshot or unistall packages for undo devs

Posted: 2020-09-01 16:13
by sickpig
Systemd-nspawn containers.

Re: Restore snapshot or unistall packages for undo devs

Posted: 2020-09-01 19:13
by bester69
sickpig wrote:Systemd-nspawn containers.
Interesting, this is a new linux technology..isnt it?... is it easy to use and deploy? ..i know how to use chroot..I will take it a look later..

thanks. :) oink!!; oink!! :lol:

Re: Restore snapshot or unistall packages for undo devs

Posted: 2020-09-02 00:04
by sgosnell
If I really want to get rid of a package, I remove it with the --purge option, then run

Code: Select all

apt autoremove
That removes the unneeded dependencies the install pulled in, provided they aren't needed by something I installed after the first one.

Re: Restore snapshot or unistall packages for undo devs

Posted: 2020-09-02 01:24
by neuraleskimo
bester69 wrote:
sickpig wrote:Systemd-nspawn containers.
Interesting, this is a new linux technology..isnt it?... is it easy to use and deploy? ..i know how to use chroot..I will take it a look later..
I want to second the pig! Containers are the way to go. Yes, they are easy to use and deploy. I am not advocating a specific technology, but if you want to try Docker, I have a container for C/C++ development that you can use as a starting point or as an example. https://github.com/tonywalker1

Good luck!

Re: Restore snapshot or unistall packages for undo devs

Posted: 2020-09-02 03:29
by stevepusser
Or build them with pbuilder or sbuild, both of which don't touch your own system packages, (mostly, some packages require dev package installs on your system for the cleaning step). :D

You can also use Timeshift instead of btrfs snapshots.

Re: Restore snapshot or unistall packages for undo devs

Posted: 2020-09-02 12:12
by bester69
stevepusser wrote:Or build them with pbuilder or sbuild, both of which don't touch your own system packages, (mostly, some packages require dev package installs on your system for the cleaning step). :D

You can also use Timeshift instead of btrfs snapshots.
I believed Timeshift was a gui for btrfs or rsync hardlinks backup restoring..what did I miss?


Very interesting, there seems to be a lot of good Solutions... I think I will try to learn Systemd-nspawn containers, to me looks like a more practical tool for many things,,



Thanks to all, for your help and opinions :o ..

Re: Restore snapshot or unistall packages for undo devs

Posted: 2020-09-02 16:22
by Head_on_a_Stick
bester69 wrote:
sickpig wrote:Systemd-nspawn containers.
Interesting, this is a new linux technology..isnt it?... is it easy to use and deploy? ..i know how to use chroot..I will take it a look later..
systemd-nspawn just offers a systemd interface for a chroot container, it is nothing new.

EDIT: I'm lazy so I don't bother with sbuild, I just package up the software and use this to install the build dependencies:

Code: Select all

# mk-build-deps --install --remove
Then remove them when $package is built:

Code: Select all

# aptitude purge $package-build-deps

Re: Restore snapshot or unistall packages for undo devs

Posted: 2020-09-06 10:28
by cuckooflew
sickpig wrote:Systemd-nspawn containers.
https://wiki.debian.org/nspawn