What to delete before taking a system snapshot

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
iain_j

What to delete before taking a system snapshot

Post by iain_j »

After getting my system up and running again I decided to make an image of my root partition with fsarchiver, to save myself a lot of time and effort when I next bork the system (I can't help but tinker :D ). I booted from the GParted live CD, mounted the root, and ran fsarchiver in verbose mode. Straight away I saw a lot of files flying by that really needn't be included and were otherwise wasting space in the archive and wasting time - KDE caches, apt-get downloads, font caches, thumbnail caches, etc.

So I restarted the system and set about clearing out the junk:
  • ran sudo apt-get clean
  • emptied the firefox cache
  • deleted banshee's database (easy enough to restore again)
  • emptied the wastebin
...and ran fsarchiver again. Just clearing those out shaved a couple of gigabytes from the archive; now it's small enough to fit on a DVD. Are there any other places I could clear files out from? I'm looking to be able to restore the system with the applications and configuration I have now, but basically empty of data. Ideally I should have done this after installing everything I wanted, but before starting to *use* the computer.

As I said there were a lot of cached thumbnails and fonts flying through the list in fsarchiver, but I don't know enough about where these are stored to go deleting things.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: What to delete before taking a system snapshot

Post by catweazel »

Install and run bleachbit.

Run the standard user bleachbit and the root mode bleachbit.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
DataMan

Re: What to delete before taking a system snapshot

Post by DataMan »

I agree.

This is exacly what I do on a weekly basis (2x - once before updates and once after)

1. Clean out e-mail etc.
2. Run Bleachbit 2x (root and normal) as they have some different cleanup points.
3. Archive #1 via fsarchiver
4. Re-boot (I run fsarchiver native boot) and upgrade.
5. Repeat the Bleachbit routine outlined above.
6. Archive #2 via fsarchiver,

This gives me clean recovery point if the upgrade proves to be "challenge".

-DataMan
iain_j

Re: What to delete before taking a system snapshot

Post by iain_j »

Thanks for the advice guys.

Installed bleachbit tonight, ran it in "normal" mode, selected everything, and freed up over 1GB of disk space.

Then I chose "Bleachbit (as root)" from the menu, entered the password... and nothing happened. Tried again, still nothing. Tried from the terminal and got this error:

Code: Select all

iain@iain-G70 ~ $ sudo bleachbit
[sudo] password for iain: 
No protocol specified
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
  warnings.warn(str(e), _gtk.Warning)
Could not open X display
Any suggestions? Tried it through su as well as sudo, same result. Can't find anything helpful on google :?
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: What to delete before taking a system snapshot

Post by catweazel »

Code: Select all

gksu bleachbit
^^^^For MATE & Cinnamon.

Code: Select all

kdesudo bleachbit
^^^^For KDE.

Also, bleachbit as root will be in your menu system somewhere.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
DataMan

Re: What to delete before taking a system snapshot

Post by DataMan »

Look in your menu for Bleachbit. When it was installed from synaptic it should have created 2 instances in the menu, 1 root and one juts named Bleachbit.

-DataMan
iain_j

Re: What to delete before taking a system snapshot

Post by iain_j »

iain_j wrote:Then I chose "Bleachbit (as root)" from the menu, entered the password... and nothing happened
Bleachbit as root wouldn't work from the menu, or from any variation of sudo / kdesudo / su.

However this morning I've discovered it will work, from the menu, after a fresh boot, but not straight after running bleachbit in normal mode. If I run it in normal mode, reboot, then run it as root, it works fine. Maybe in normal mode it deletes something which temporarily breaks the system, but is then restored during bootup.

Anyway, I did all this, booted from the GParted DVD, ran fsarchiver again and now have a 1.8gig archive of my operating system - it was about 5 gig first time round. Happy with that 8)
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: What to delete before taking a system snapshot

Post by catweazel »

iain_j wrote:Happy with that 8)
Glad you got it sorted. Cheers.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
Locked

Return to “Other topics”