Sorry if something like this already exists, but in my research I found no evidence that it did.
what I want: a "monitor" type script that I can write, that I would "activate" prior to apt-get installing one or more (emphasis on more) packages, then "deactivate" it when I am done. It will 'log' everything installed, and if I am not happy with the installation, will remove all traces of all installs with one command.
I want to do this because I am a programmer, and setting up the programming environment for a new language can be bug ridden (or riddled with my own user error). For instance go lang gave me trouble, but ruby/rails was rather painless, etc
now, it is my understanding that apt-get purge, and autoremove do a pretty good job of cleansing the system of a package, but I'd like to think my idea is still useful when installing many packages in succession.
My question: How should I accomplish this most effectively, speed and logicality being a priority.
All (even seemingly bad) ways that I have found to implement:
--inotifywait: inconceivable for system wide use, could apply only to 'popular' directories, but would have files slip through the cracks
--diff: same as above, pretty much.
--git: use git to save a "picture" that could be rolled back to. Same issues as above, but to a lesser extent (in my opinion. Please correct me if otherwise)
--Log package names installed (somehow)/simply count number of packages installed, then go into /var/cache/apt and use apt-get remove etc. Would anything slip through the cracks here (usually)?
I listed the ideas in the order that I had them, in conjunction with my research, so as you can see they evolved into more reasonable solutions.
So essentially I come here for advice, because I am completely comfortable writing a bash script, but I've never had a need for one before, so I seek wiser counsel. And to be honest this is for fun and to learn, also.
Thanks!
apt-get
stores logs in/var/log/apt/
, if this help you. see http://askubuntu.com/questions/21657/show-apt-get-installed-packages-history-via-commandline and http://askubuntu.com/questions/425809/where-are-the-logs-for-apt-get – Ron Jun 12 '15 at 07:18