Ubuntu – How I do a system restore


Problem I Faced

  • I installed something that crashed my Wifi drivers that I compiled earlier.
  • Un-installing the same package doesn't helped.
  • Finally, I re-compiled my wifi drivers and things are good.

My Question

But, is there anything like System Restore or System Rollback in Ubuntu/LinuxMint?

  • Is there anything that can undo an apt-get install package command?

Best Answer

The complement of apt-get install package is apt-get remove package. To remove all associated settings too, you need to run apt-get purge package.

Note that these commands rely on the uninstallation scripts provided with the package. All packages in the main repository I know of do their job of uninstalling very well. This may not be the case for third-party packages.

As for your driver issue, there are a few possibilities why installing a package broke your wireless driver:

  • The driver has a post-installation hook which is executed when a condition is met, e.g. kernel updates
  • The package overwrote a file that the wireless driver depended on
  • The package in question was a kernel update but the driver does not have a post-installation hook for recompiling the driver (most likely)

As for the "System rollback" / "System Restore" features, the closest feature you'll get is a system image using software like Clonezilla. Unfortunately, this cannot be done within a running system and must be performed from a Live CD.

Related Question