Just a side note regarding this:
Originally Posted by ruario
If you don't trust the installer (I would, but then I have used it quite a few times). You can get a rough log of the files it places down by running a find command before and after the install and diffing the results as follows:
# find /etc /opt /usr ! -type d -print > /tmp/before_vbox
# find /etc /opt /usr ! -type d -print > /tmp/after_vbox
# diff /tmp/before_vbox /tmp/after_vbox | sed -n 's/^> //p' > VirtualBox-4.1.18-78361_install.log
In addition to the files listed in VirtualBox-4.1.18-78361_install.log, the install script will also add some commands to /etc/rc.d/rc.local and (I think, though perhaps I added them myself) /etc/rc.d/rc.local_shutdown, so have a look at these files before and after install.
If you go down this route, after making VirtualBox-4.1.18-78361_install.log manually check that it only has VirtualBox files (if you installed anything else in the background or made configuration changes in /etc, these might be listed). Once you are satisfied that they are VBox only files keep this log around as it means that should you ever want to kill VirtualBox, instead of /opt/VirtualBox/uninstall.sh you could simply do the following:
# cat VirtualBox-4.1.18-78361_install.log | xargs -d'\n' -n1 rm -v
Note: The changes to /etc/rc.d/rc.local would remain but the commands in them check for the precence of an installed VirtualBox before they attempt to run anything, so they are fairly harmless. Additionally, that command would leave behind some empty directories created by the VirtualBox install script. I intentionally left directories out of the find command because it simplifies the result and because empty directories don't really affect anything. Though if empty directories really bother you, they are fairly trivial to locate with a find command, e.g.:
# find /etc /opt /usr -type d \( -iname "vbox*" -o -iname "virtualbox*" \) -print
Another nice thing about creating install logs like this for VirtualBox is that you can make a binary backup package of the software. This is handy for quick reinstall (no compiling kernel modules), or for install on another similar architecture and version Slackware machine, even if the other machine does not have the kernel-source package installed (though you'd need to update /etc/rc.d/rc.local manually). This can be done as follows:
# cat VirtualBox-4.1.18-78361_install.log | cpio -ovHnewc | xz > VirtualBox-4.1.18-78361.x86.linuxbinary.cpio.xz
Once done you don't even need to keep VirtualBox-4.1.18-78361_install.log around anymore as the archive itself is also the log, e.g. you could use it to remove VirtualBox like so:
# xz -d < VirtualBox-4.1.18-78361.x86.linuxbinary.cpio.xz | cpio -t | xargs -d'\n' -n1 rm -v
If you wanted to reinstall (or install on another machine), you would issue:
# xz -d < VirtualBox-4.1.18-78361.x86.linuxbinary.cpio.xz | cpio -imdv
Or if you are more of a tar fan. Here are those three commands again, tar-style.
Make binary backup package:
# cat VirtualBox-4.1.18-78361_install.log | tar -T- -cvPJf VirtualBox-4.1.18-78361.x86.linuxbinary.tar.xz
Note: If you made the log differently and it included directories as discrete entries you would also need GNU tar's "--no-recursion" switch.
# tar Ptf VirtualBox-4.1.18-78361.x86.linuxbinary.tar.xz | xargs -d'\n' -n1 rm -v
# tar Pxvf VirtualBox-4.1.18-78361.x86.linuxbinary.tar.xz
You can actually use simple tricks like this with almost any other software you wish to track, e.g. source installs where you are too lazy to make a SlackBuild.
That all said, it would be remiss of me not to mention that slacktrack, src2pkg, paco, etc. are better and more comprehensive solutions. What I like about doing things the way I outline above is the simplicity. No extra tools are required and the same kinds of tricks will work across distros.
: If anyone is curious, on my own machine I make a directory ('/var/log/footprints/') where I keep logs for software that I am tracking in this way. For example on the machine I am using now that directory contains:
$ ls /var/log/footprints/
Within the log files I add a reference to the log itself as the last entry, e.g.:
$ cat /var/log/footprints/heirloom-pax-070715
That way a removal command would remove everything, including the log itself, e.g.:
# cat /var/log/footprints/heirloom-pax-070715 | xargs -d'\n' -n1 rm -v
Now excuse me while I go and re-install heirloom-pax.
P.S. [Even further off-topic] Compiling heirloom-pax the way I want
is slightly messy. I'm half-way to a proper build script. I really should find the time to convert it to a SlackBuild and submit it to SBo. There is already one pax on SBo but this one has a lot of nice options not found in the more common pax implementations, such as being about to read and write the following cpio formats: newc, crc, sco, scocrc, odc, bin, bbs, sgi, cray, cray5 and dec, in addition to tar, otar, ustar, pax, suntar, gnutar, bar and even zip!