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

Archived topics about LMDE 1 and LMDE 2
Locked
Intio

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

Post by Intio »

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.
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.
ketoth

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

Post by ketoth »

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.
Intio

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

Post by Intio »

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.
mockturtl

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

Post by mockturtl »

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.
sobrus

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

Post by sobrus »

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.
mockturtl

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

Post by mockturtl »

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.
sobrus

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

Post by sobrus »

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.
mockturtl

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

Post by mockturtl »

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
sobrus

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

Post by sobrus »

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.
mockturtl

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

Post by mockturtl »

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?
sobrus

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

Post by sobrus »

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:
Locked

Return to “LMDE Archive”