You are not logged in.

#1 2018-12-22 11:13:41

XanII
Member
From: Helsinki, Finland
Registered: 2017-07-20
Posts: 15

Disk Cleanup - Optimizing disk usage [Solved]

Oh ye gurus of the best distro on this planet. I have a question: I am running bunsenlabs on a old SSD eeePC903 and it has only a small 4gb disk for the system

Updating the machine has lately been quite hazardous as the space runs out forcing me to use recovery mode. In there i have done a 'apt-get cleanup' as first resort to get some <10% free again so i can boot to system.

Any tips on how to slim down the system so that it would have a impact? There is lot of stuff to remove yes but what takes the most space and is the least usable if the main use for the machine is to act as a 'side-pc' on the desk and e.g. browser use mainly (and my belowed conky of course) but not much else. (it is so slow that even youtube is too much for it)

Last edited by XanII (2019-01-07 12:47:09)

Offline

#2 2018-12-22 14:48:27

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2015-09-29
Posts: 648

Re: Disk Cleanup - Optimizing disk usage [Solved]

Go to your home dir and execute:

$ du -d1 -h | sort -h

and you will see what takes up the space.

Alternatively, install 'ncdu', and explore disk usage more easily (it is CLI tool).

On my system:

$ du -d1 -h | sort -h
...
137M	./.mozilla
214M	./.moonchild productions
260M	./.thumbnails
782M	./.local
1.8G	./.cache
...

I believe some of those can be safely deleted, for example '.cache' and '.thumbnails'. BEWARE: I'm not sure if it can be safely deleted. Please investigate it by yourself.

Also, sometimes '$HOME/.xsession-errors' file grows quite large. This one you can safely delete across reboots. I do it automatically with this

file=".xsession-errors"
if [ -e "$file" ] && [ `stat -c '%s' ${file}` -gt 3000000 ]
then 
    truncate --size 100 "$file"
fi

in my $HOME/.bashrc

HTH


Postpone all your duties; if you die, you won't have to do them ..

Offline

#3 2018-12-22 16:23:12

XanII
Member
From: Helsinki, Finland
Registered: 2017-07-20
Posts: 15

Re: Disk Cleanup - Optimizing disk usage [Solved]

Thanks that can be useful. I was thinking about going through some packages in the system and removing also. It appears i'll need at least 1gb of free to be 'safe enough' it seems.

Offline

#4 2018-12-22 17:29:28

XanII
Member
From: Helsinki, Finland
Registered: 2017-07-20
Posts: 15

Re: Disk Cleanup - Optimizing disk usage [Solved]

Tested it. /home is on different partition. Shame, found a lot of stuff there. This pc has a different physical ssd for that for some reason.

Offline

#5 2018-12-23 02:46:25

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 5,839
Website

Re: Disk Cleanup - Optimizing disk usage [Solved]

Two Debian Wiki pages on reducing disk usage:
https://wiki.debian.org/ReduceDebian
https://wiki.debian.org/FreeSpace


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#6 2018-12-23 06:50:34

ohnonot
...again
Registered: 2015-09-29
Posts: 3,998
Website

Re: Disk Cleanup - Optimizing disk usage [Solved]

XanII wrote:

i have done a 'apt-get cleanup' as first resort to get some <10% free again so i can boot to system.

you can make that permanent, but i don't know how. synaptics has a preference to always delete files after installation.
also do "apt autoremove" regularly.

... there's a LOT you can do to save space ...

have a look at all packages installed and sort by installed size.

i have 2 kernel versions installed, surely one of them can go.

firefox is a hog and probably not much use on this matured laptop anyhow.

fonts-noto-cjk - that's east asian fonts, do we really need those?

libreoffice - will that even start on your eeepc? it's a hog.

etc.

Last edited by ohnonot (2018-12-23 06:51:17)

Offline

#7 2018-12-23 09:55:39

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2015-09-29
Posts: 648

Re: Disk Cleanup - Optimizing disk usage [Solved]

XanII wrote:

Tested it. /home is on different partition. Shame, found a lot of stuff there. This pc has a different physical ssd for that for some reason.

For small disks, layout with separate partitions is not optimal, space-wise. I mean: one may have free space on /home, and no space left on other partitions like /use (or vice versa), and it is very difficult to move for example part of /usr to /home (probably via symlinks).

If I understand correctly, you have tow disks, and one is /home, on other is everything else. In this case, I would go via LVM route. It can 'collect' (group) all your physical drives into single volume, and OS will think there is only single large volume. Then you put your installation on single LVM partition and have no dilemma how much to reserve for particular partition.


Postpone all your duties; if you die, you won't have to do them ..

Offline

#8 2018-12-23 13:20:16

XanII
Member
From: Helsinki, Finland
Registered: 2017-07-20
Posts: 15

Re: Disk Cleanup - Optimizing disk usage [Solved]

Good ideas and worth checking out. The current setup is so that / is the smaller disk and /home is the larger one. Should be the other way around since i don't really save much stuff in /home. LVM may be a middle road to that.

Offline

#9 2018-12-23 13:51:13

XanII
Member
From: Helsinki, Finland
Registered: 2017-07-20
Posts: 15

Re: Disk Cleanup - Optimizing disk usage [Solved]

So did some manual cleanup. Libreoffice, Bittorrent client, Filezilla got shown to the door. But they dont use much space.

Synaptic does not show used space very easily.  neutral

Found some terminal commands but they need pipe and i can't figure out how to get the pipe symbol on this old eeePC.

Offline

#10 2018-12-23 13:58:43

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2015-09-29
Posts: 648

Re: Disk Cleanup - Optimizing disk usage [Solved]

^^Well ... you can buy cheap 32 GB ssd, should be enough if you live 'on the edge' with 4GB.

As for the LVM ... to me the LVM seems the best solution in your situation, with two small disks, and not knowing in advance which partition will take up more space ... and one never really knows wink

Last edited by iMBeCil (2018-12-23 13:59:00)


Postpone all your duties; if you die, you won't have to do them ..

Offline

#11 2018-12-23 14:01:05

damo
....moderator....
Registered: 2015-08-20
Posts: 5,086

Re: Disk Cleanup - Optimizing disk usage [Solved]

XanII wrote:

...

Found some terminal commands but they need pipe and i can't figure out how to get the pipe symbol on this old eeePC.

Run xev and hit the keys until you find which key(s) give "bar".


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#12 2018-12-23 14:04:01

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2015-09-29
Posts: 648

Re: Disk Cleanup - Optimizing disk usage [Solved]

XanII wrote:

So did some manual cleanup. Libreoffice, Bittorrent client, Filezilla got shown to the door. But they dont use much space.

Did you do something like:

$ sudo apt-get autoremove --purge && sudo apt-get autoclean && sudo apt-get clean

after you have deinstalled those packages? The first one may do the trick.

Personally, I have an alias for this and do it regularly after 'apt-get dist-upgrade' ...

Last edited by iMBeCil (2018-12-23 14:05:34)


Postpone all your duties; if you die, you won't have to do them ..

Offline

#13 2018-12-23 14:09:07

XanII
Member
From: Helsinki, Finland
Registered: 2017-07-20
Posts: 15

Re: Disk Cleanup - Optimizing disk usage [Solved]

iMBeCil wrote:

^^Well ... you can buy cheap 32 GB ssd, should be enough if you live 'on the edge' with 4GB.

As for the LVM ... to me the LVM seems the best solution in your situation, with two small disks, and not knowing in advance which partition will take up more space ... and one never really knows wink

What is the term for grouping disks? I have been scouring LVM docs here also. They do exist  a plenty but trying to find LVM documentation about grouping disks together so that you don't have to re-install the whole system again is not that easy. Or to figure out if that is even possible.

Offline

#14 2018-12-23 14:12:55

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2015-09-29
Posts: 648

Re: Disk Cleanup - Optimizing disk usage [Solved]

XanII wrote:

What is the term for grouping disks? I have been scouring LVM docs here also. They do exist  a plenty but trying to find LVM documentation about grouping disks together so that you don't have to re-install the whole system again is not that easy. Or to figure out if that is even possible.

I believe setting up the LVM without reinstalling can be done with backing up partition with dd ... But, you would have to be careful with disk sizes ... and whatnot. I have never done that myself, and wouldn't recommend doing it. Simply, it is much more time consuming to figure all details, compared to quick reinstall (with backing up your valuable data, of course).

EDIT: terms in LMV language are nicely described here.

Last edited by iMBeCil (2018-12-23 14:14:35)


Postpone all your duties; if you die, you won't have to do them ..

Offline

#15 2018-12-23 14:14:32

XanII
Member
From: Helsinki, Finland
Registered: 2017-07-20
Posts: 15

Re: Disk Cleanup - Optimizing disk usage [Solved]

iMBeCil wrote:
XanII wrote:

So did some manual cleanup. Libreoffice, Bittorrent client, Filezilla got shown to the door. But they dont use much space.

Did you do something like:

$ sudo apt-get autoremove --purge && sudo apt-get autoclean && sudo apt-get clean

after you have deinstalled those packages? The first one may do the trick.

Personally, I have an alias for this and do it regularly after 'apt-get dist-upgrade' ...

This one nuked surprisingly much stuff. Synaptic did a 'remove config files' -type of cleanup according to the prompt but apparently there still was a lot of stuff. Now i am at 20% disk free on the 4gb so that is pretty well already.

Last edited by XanII (2018-12-23 14:15:16)

Offline

#16 2018-12-23 14:16:50

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2015-09-29
Posts: 648

Re: Disk Cleanup - Optimizing disk usage [Solved]

^Yes, it did remove not-any-more-needed libraries, which might be quite a large amount of disk.

Glad it worked for you.


Postpone all your duties; if you die, you won't have to do them ..

Offline

#17 2018-12-23 14:23:55

XanII
Member
From: Helsinki, Finland
Registered: 2017-07-20
Posts: 15

Re: Disk Cleanup - Optimizing disk usage [Solved]

Yes, ty for the help + a little mental excercise on how to deal with small disks on these old eeePC machines.

Last edited by XanII (2018-12-23 14:25:05)

Offline

#18 2018-12-23 14:32:43

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2015-09-29
Posts: 648

Re: Disk Cleanup - Optimizing disk usage [Solved]

^You're welcome  wink


Postpone all your duties; if you die, you won't have to do them ..

Offline

#19 2018-12-24 03:49:08

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 5,839
Website

Re: Disk Cleanup - Optimizing disk usage [Solved]

XanII wrote:

Synaptic does not show used space very easily.

menu>settings>preferences>columns and fonts
Check "size" and move it up.

Left side buttons>Status>installed
Now click on the "size" column to see all installed packages ordered by size.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#20 2018-12-27 14:02:18

XanII
Member
From: Helsinki, Finland
Registered: 2017-07-20
Posts: 15

Re: Disk Cleanup - Optimizing disk usage [Solved]

johnraff wrote:
XanII wrote:

Synaptic does not show used space very easily.

menu>settings>preferences>columns and fonts
Check "size" and move it up.

Left side buttons>Status>installed
Now click on the "size" column to see all installed packages ordered by size.

Thank you. This was useful. Cleaned up further stuff. Now more obvious space taking stuff so now i am all set for future update needs as well.

Offline

#21 2019-01-05 09:26:14

ohnonot
...again
Registered: 2015-09-29
Posts: 3,998
Website

Re: Disk Cleanup - Optimizing disk usage [Solved]

it's been a while.

how's it going?

personally i think LVM is overkill for a netbook, but apparently the overhead is negligable.

what about the keyboard layout? is it not finnish?
maybe you can use xvkbd to get at the pipe.

Offline

#22 2019-01-05 09:38:06

XanII
Member
From: Helsinki, Finland
Registered: 2017-07-20
Posts: 15

Re: Disk Cleanup - Optimizing disk usage [Solved]

Having the packet sizes visible and cleaning up items i don't use was enough. There is now plenty of space for the OS.  Netbook not used for anything else than some comics, wiki web searches, music player etc. so quite lightweight stuff. It is some 11 years old to begin with. And putting more SSD or Ram into is just not something i want to do. big_smile  Strangely though it's at the time very strong battery is still alive.

LVM is doable but don't want to reinstall everything right now. I have nuked the machine many times in the latest years so i am happy the way it is now.

Keyboard layout is in Finnish and works. I did eventually find the pipe.

Offline

#23 2019-01-05 12:04:19

ohnonot
...again
Registered: 2015-09-29
Posts: 3,998
Website

Re: Disk Cleanup - Optimizing disk usage [Solved]

i think you could mark this [SOLVED] now - just edit the title of your first post.

Offline

#24 2019-01-05 22:21:04

Bearded_Blunder
Dodging A Bullet
From: Seat: seat0; vc7
Registered: 2015-09-29
Posts: 730

Re: Disk Cleanup - Optimizing disk usage [Solved]

ohnonot wrote:

personally i think LVM is overkill for a netbook, but apparently the overhead is negligable.

Ah.. but you get the ability to do snapshots for live backup, the first distro that defaults to it with a point & click backup solution installed is going to please many users coming from Windows, which has such a solution built in.. even if there are many better free (as in beer) ones.

Setting it up using the command line & scripts under Linux is a pain. And the default install without LVM you have to image offline.


Blessed is he who expecteth nothing, for he shall not be disappointed...
If there's an obscure or silly way to break it, but you don't know what.. Just ask me

Offline

#25 2019-01-06 10:18:25

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2015-09-29
Posts: 648

Re: Disk Cleanup - Optimizing disk usage [Solved]

^Well, doing the LVM live backup, with zero downtime, is not that difficult, it takes only three commands. See for example this post on forum.


Postpone all your duties; if you die, you won't have to do them ..

Offline

Board footer

Powered by FluxBB