--- "Keep or Install new" ---

Post your update and upgrade related errors here
Forum rules
Before you post please read this

--- "Keep or Install new" ---

Postby Intio on Wed Oct 03, 2012 11:51 am

Has anyone else's system bloated by 200-300 megs since UP5? Is this due to selecting "Keep" when faced with the "Keep or Install new" option during upgrade, as were were instructed to do?

If so then can anyone tell me if after UP6, for instance, it will be safe to go back and uninstall the older files which we were told to "Keep". I have a netbook with severely limited SSD space, and 200-300 megs is a large portion of the free space after my needed (never mind wanted) apps are installed. Any help in recovering that space (if I have identified the correct cause) would be appreciated.
Asus Eee 701 Netbook - 2GB OCZ RAM
Debian Edition - Xfce
Intio
Level 3
Level 3
 
Posts: 107
Joined: Tue Dec 01, 2009 2:16 pm

Linux Mint is funded by ads and donations.
 

Re: --- "Keep or Install new" ---

Postby ketoth on Wed Oct 03, 2012 1:46 pm

Well, often new software version = heavier software :) So the 200-300 is normal. If you want to free some space by removing the packages from the APT cache, sudo apt-get autoclean.
Keeping was the right choice, these were config files that differ from the Debian (read: Mint customizations like distro name in GRUB). A few kilobytes difference, anyway.

UP6 will likely come with an ISO release, you will have the possibility to install fresh.

By the way a pretty full SSD is a SSD that won't last long. There are some tricks to reduce the usage, for example this in /etc/fstab, mounting little SSDkillers in RAMdisk:

tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/log tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0

Also, making a symlink from ~/.thumbnails/ to /tmp, and changing Firefox's "browser.cache.disk.parent_directory" to /tmp/.
Well for LMDE, a 50 GB+ SSD should be ok.
Proud Linux Mint Debian user since 04/2011
mirror.rts-informatique.fr mirror tech maintainer

Likes GPL and Creative Commons and people using them
Somewhere between Linus Torvalds and Richard Stallman
ketoth
Level 2
Level 2
 
Posts: 81
Joined: Sat Dec 31, 2011 8:01 pm

Re: --- "Keep or Install new" ---

Postby Intio on Thu Oct 04, 2012 11:53 am

Thanks for responding. Yes, I always clean out the APT cache and I've been aware of how to preserve the SSD since I first got it (etc/fstab): though I hadn't considered

Also, making a symlink from ~/.thumbnails/ to /tmp, and changing Firefox's "browser.cache.disk.parent_directory" to /tmp/.


Neat idea. I think a fresh install from a UP6 ISO (provided it comes fairly soon) may be called for. Depends on what I'll need by then.
Asus Eee 701 Netbook - 2GB OCZ RAM
Debian Edition - Xfce
Intio
Level 3
Level 3
 
Posts: 107
Joined: Tue Dec 01, 2009 2:16 pm

Re: --- "Keep or Install new" ---

Postby mockturtl on Thu Oct 04, 2012 1:08 pm

Has anyone else's system bloated by 200-300 megs since UP5? Is this due to selecting "Keep" when faced with the "Keep or Install new" option during upgrade, as were were instructed to do?

If so then can anyone tell me if after UP6, for instance, it will be safe to go back and uninstall the older files which we were told to "Keep".
No, those are just configuration files. They're tiny, and plain text. Typically you want to keep Mint custom tweaks instead of having them stomped by new versions.

1) First, clear the download cache and flush old dependencies:
Code: Select all
$ sudo apt-get clean && sudo apt-get autoremove


2) Bloat accumulates with packages that include their version in the package name. An update is a new package, and the old one isn't removed automatically. You can recover significant HDD space removing these "obsolete" packages.

Use Synaptic and sort by size, or

Code: Select all
$ aptitude search ~o
Java 6, for example, is a few hundred MB. The previous kernel is 100 MB, but keep two versions installed so you have a backup.

Caution: the list will include deb files you've installed manually. Before removing any obsolete package, make sure you have a newer version, or don't need it.
Image
User avatar
mockturtl
Level 4
Level 4
 
Posts: 442
Joined: Sat Oct 09, 2010 8:51 pm

Re: --- "Keep or Install new" ---

Postby sobrus on Fri Oct 19, 2012 8:02 am

When you install new package version, old one is not removed if it has different package name (for example x264-116, libavcodec54 etc).

so try
1) installing localepurge - it will automagically remove unneccessary localization files (also after every apt-get install). just make sure to leave english and your native language untouched ;)
2) deborphan

and eventually as root (can be risky!)

apt-get purge $(deborphan)

few passes will be needed until you get rid of all unnecessary stuff (this is normal - removed packages allow to remove another packages).

I think you can save few hundreds MB by using both those methods. Without uninstalling anything.

3) remove unneccessary stuff in synaptics (for example - you don't need mesa if you are using fglrx. there are many big packages you probably don't need).

But be warned - before you start anything please MAKE BACKUP.

I've been using method 1 and 2 for months now and no problems, they seem to be quite safe and simple to perform.
Method 3 needs a but more wisdom and I messed my OS a few times :)
But I have 10GB root with 5500MB free now with UP5 and all my space hungry apps, both mate and cinnamon installed.
sobrus
Level 2
Level 2
 
Posts: 87
Joined: Thu Aug 30, 2012 1:36 am

Re: --- "Keep or Install new" ---

Postby mockturtl on Sat Oct 20, 2012 6:40 pm

Wow.

Code: Select all
$ sudo aptitude safe-upgrade
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
localepurge: Disk space freed in /usr/share/locale: 461944 KiB
localepurge: Disk space freed in /usr/share/man: 6396 KiB
localepurge: Disk space freed in /usr/share/gnome/help: 61676 KiB
localepurge: Disk space freed in /usr/share/omf: 1980 KiB

Total disk space freed by localepurge: 531996 KiB
Great tip, thanks sobrus.
Image
User avatar
mockturtl
Level 4
Level 4
 
Posts: 442
Joined: Sat Oct 09, 2010 8:51 pm

Re: --- "Keep or Install new" ---

Postby sobrus on Mon Oct 22, 2012 1:49 am

You're welcome :)
I think you can save additional ~200-300MB or maybe even more, by using deborphan, it is more risky though.

run 'deborphan' to see how many packages can it remove (this is safe).
These are most probably not needed anymore.
sobrus
Level 2
Level 2
 
Posts: 87
Joined: Thu Aug 30, 2012 1:36 am

Re: --- "Keep or Install new" ---

Postby mockturtl on Mon Oct 29, 2012 3:31 pm

sobrus wrote:You're welcome :)
I think you can save additional ~200-300MB or maybe even more, by using deborphan, it is more risky though.

run 'deborphan' to see how many packages can it remove (this is safe).
These are most probably not needed anymore.
To find out how much space you can recover: output with package sizes (in kB) -- sum the first column:
Code: Select all
deborphan -z | \
awk '{s+=$1}END{print s}'
I get 42827 (43 MB).

A different trick to sum lines from a file is to join them as a + separated string, and evaluate it:

Code: Select all
deborphan -z | \
sed -r -e 's/\s[a-z0-9:.-]*$//g' -e 's/^\s*//g' | \
paste -sd+ | \
bc
Image
User avatar
mockturtl
Level 4
Level 4
 
Posts: 442
Joined: Sat Oct 09, 2010 8:51 pm

Re: --- "Keep or Install new" ---

Postby sobrus on Wed Oct 31, 2012 8:29 am

I believe this is not quite correct.

As soon as you ***actually*** remove packages, more packages will become orphaned and viable for removing.

It took about 4 or 5 passes of "apt-get remove" until deborphan showed no more orphaned packages.

Thus, most probably, you will be able to gain more. Maybe much more. But it will be probably one way ticket, so backup is strongly recommended.
(deborphan did no harm to my machine, but YMMV).

btw I used different method to estimate gain.
Simply execute "apt-get purge $(deborphan)" and see what it wants to remove. Then abort.
sobrus
Level 2
Level 2
 
Posts: 87
Joined: Thu Aug 30, 2012 1:36 am

Re: --- "Keep or Install new" ---

Postby mockturtl on Wed Oct 31, 2012 5:30 pm

sobrus wrote:I believe this is not quite correct.

As soon as you ***actually*** remove packages, more packages will become orphaned and viable for removing.

It took about 4 or 5 passes of "apt-get remove" until deborphan showed no more orphaned packages.
Good point, we're pruning dead tips of the dependency tree.

I recovered another 150MB with the --libdevel option.

btw I used different method to estimate gain.
Simply execute "apt-get purge $(deborphan)" and see what it wants to remove. Then abort.
Neat -- I didn't know apt could handle the trailing ":arch" information.

I just noticed this discrepancy --
Code: Select all
$ df
Filesystem                                              Size  Used Avail Use% Mounted on
rootfs                                                  9.8G  8.8G  465M  96% /
                                                      # 9.8 - 8.8 != 0.465

The "missing" bytes are about as much as localepurge freed; could it be the cause?
Image
User avatar
mockturtl
Level 4
Level 4
 
Posts: 442
Joined: Sat Oct 09, 2010 8:51 pm

Re: --- "Keep or Install new" ---

Postby sobrus on Fri Nov 02, 2012 2:32 am

no, but if your filesystem is EXT, you probably have 5% of space reserved for system purposes. This space is visible only for root user.

To "correct" this, providing your root is sda1:

sudo tune2fs -m 0 /dev/sda1

and check again :mrgreen:
sobrus
Level 2
Level 2
 
Posts: 87
Joined: Thu Aug 30, 2012 1:36 am

Linux Mint is funded by ads and donations.
 

Return to Update/Upgrade Issues

Who is online

Users browsing this forum: No registered users and 4 guests