I am trying to learn Ubuntu (and Linux in general) on a much deeper level right now and am having a nightmare tracking changes - in particular with the package management system.
Is there any (relatively easy) way I can snapshot the file system and then at a later date compare all changes that have been made since the initial snapshot?
Or, if not file system, can you recommend any technique or program that can help me to achieve this?
Please note that I am looking for an answer that can help me to understand the system deeper and to learn more, I am not looking for how to fix/uninstall. I use virtualisation a lot and can easily rollback if I need to.
If anyone is interested why I am asking this question or if anyone else is tryign to learn...
I installed Ubuntu Server and everything works great - I then wanted to try to install and learn X and how different shells work, so, I typed apt-get install kde
, and even though I later did apt-get autoremove kde
, there still appears to be hundreds of packages installed that are no longer needed or didn't get removed.
Putting the packages aside, there are bigger system level changes that have occurred such as the system calling startx (I guess) at the startup, but, without KDE, it just freezes... I managed to fix with adding the "text" option to grub, however, considering a default install of Ubuntu without X doesn't have this, I feel like I have cheated and I would like to know how/where X is being invoked.
For snapshots:
you can use, snapper or backintime-common. Here's how to install both of these:
more info on snapper can be found here
more info on backintime can be found here
and this ubuntugeek article on backintime
To checkout your dpkg logs:
Your system changes such as all the package changes updates and installed/uninstalled packages are listed in /var/log/dpkg.log. Open a terminal and execute the following commands to take a look at what you have here:
First, make a directory to work in:
change your current directory:
copy your dpkg log files into the new directory:
change the owner of the files to your username:
unzip the compressed logfiles (if any). BTW it might say "unknown suffix -- ignored" and that's okay:
list the files in your directory
The newest entries will be found in dpkg.log, the oldest entries will be found in the file with the largest number at the end of the filename (dpkg.log.2 for example or dpkg.log.3 and so on).
To read the most recent changes (file dpkg.log):
or, from any directory:
To read dpkg.log.2 for example:
and so on. Press q to exit a file.
Most other log files can be found in /var/log as well. To list the contents of /var/log:
Alternatively, you could install ubuntu on a btrfs partition rather than use the default ext4 filesystem. Unlike windows (which is only installable on NTFS), Ubuntu can be installed on many different filesystem types. The default is ext4, there is ext3, ext2, btrfs and a couple others available as well if I'm not mistaken. You may be interested in checking it out for a future ubuntu install.
If you install ubuntu using a btrfs partition instead of an ext4 fylesystem, you can then install these helpful tools after installation of the operating system:
Snapshots are made each time you use apt-get so you can always revert back after installing or uninstalling software.
official ubuntu documentation can be found here
btrfs vs ext4 benchmarking on kernel 3.15 can be found here (not ubuntu specific)
Given the phrasing of your question I'm not sure if you are not actually asking for something still more detailed than this, but I'm just telling you what I know.
If you go to your Ubuntu Software Center and then click on the "history" icon, you should see everything you are seeking. If there's something you aren't finding there, I'm extremely curious to know what it is.