1) Noticing that this PC gets glacially slow occasionally (it probably means get a new one and soon but bear with me for the moment) I had a look at the hard disk. 77 GB is 84.4% full. I have two partitions though. One 'extended partition', the other a swap partition. Both 3.1 GB. Could I unmount the first (extended partition) safely?
2) What is it full of and how could I clear stuff out, again, safely?
Bev. (braced for the worst.)
On Fri, Nov 09, 2018 at 07:30:49PM +0000, Bev Nicolson wrote:
- Noticing that this PC gets glacially slow occasionally (it probably means
get a new one and soon but bear with me for the moment) I had a look at the hard disk. 77 GB is 84.4% full. I have two partitions though. One 'extended partition', the other a swap partition. Both 3.1 GB. Could I unmount the first (extended partition) safely?
- What is it full of and how could I clear stuff out, again, safely?
To see where space is being used open a terminal window and do:-
sudo du -xk --max-depth=1 /
This will show you the amount of space used by each root level directory, you can then dig further to see whether there is any wasted space anywhere.
On Fri, 2018-11-09 at 20:21 +0000, Chris Green wrote:
On Fri, Nov 09, 2018 at 07:30:49PM +0000, Bev Nicolson wrote:
- Noticing that this PC gets glacially slow occasionally (it probably means
get a new one and soon but bear with me for the moment) I had a look at the hard disk. 77 GB is 84.4% full. I have two partitions though. One 'extended partition', the other a swap partition. Both 3.1 GB. Could I unmount the first (extended partition) safely?
- What is it full of and how could I clear stuff out, again, safely?
To see where space is being used open a terminal window and do:-
sudo du -xk --max-depth=1 /
This will show you the amount of space used by each root level directory, you can then dig further to see whether there is any wasted space anywhere.
May I commend JDiskReport to the assembled multitudes?
http://www.jgoodies.com/freeware/jdiskreport/
On 09/11/18 19:30, Bev Nicolson wrote:
- Noticing that this PC gets glacially slow occasionally (it probably
means get a new one and soon but bear with me for the moment) I had a look at the hard disk. 77 GB is 84.4% full. I have two partitions though. One 'extended partition', the other a swap partition. Both 3.1 GB. Could I unmount the first (extended partition) safely?
Unlikely. If you have 77Gb but two partitions both 3.1GB then the maths doesn't work out. I suspect your disk is partitioned with a primary partition of 77GB and the 3.1GB extended partition is (for all intents and purposes) also the swap partition. Linux usually needs the swap partition, so I recommend not messing with it.
[Explanation. You can skip this] Old style disks could have up to 4 partitions on them. Usually the first is marked as the Bootable partition. People got fed up with only being able to have 4 partitions, so came up with a tweak. The normal style partitions were called Primary Partitions and a new type of partition was invented called an Extended partition. Extended partitions can have lots of "logical partitions" in them. Ubuntu used to install itself with 1 primary partition with the / directory in it. It them used to create an extended partition, and into this create one extended partition with the swap file in it. No space (or hardly any) is wasted with this setup.
You may be able to visually see your disk layout if you use gparted or the gnome disk utility (on the menu as "Disks". Don't change anything though! [End of explanation]
- What is it full of and how could I clear stuff out, again, safely?
Temporary files. Cruft.
Sorry - glib answers. Firstly, if you keep your machine up-to-date on updates, but don't tidy it up, you are likely to have lots of old kernel files installed. It's easy to see this if you have the synaptic package manager installed. (apt-get install synaptic if you haven't!) start synaptic. On the left hand side select the line saying "Installed" Scroll the right-hand list until you get to entries listed linux. You will probably find entries listed linux-headers, linux-modules and linux-image and possibly linux-tools. These are followed by a version number. These numbers are linux version numbers.
{DON'T DO THIS UNLESS YOU'RE SURE - Read the rest of the post first} Right click on the ones with the smaller numbers and choose Mark for removal. Leave the higher numbers - I tend to leave 2 or 3 of the most recent versions. I'm currently running 4.15.0-38.41. I'm showing an older version 4.15.0-36.39
If you want to proceed, press "Apply" button. It should list only linux packages to be removed, but nothing else. If something else is listed, then something has gone wrong. Stop and try again.
Alternative tools: Find and install Ubuntu Tweak. Beware, it's old & not updated any more. If you find it and install it, go to the Janitor Tab. You can clear Web Browser Caches, image caches, Apt Cache, Old Kernel files, and unneeded packages.
Other ways to delete necessary files A still-updated tool is Bleachbit. Run it (not as root). OK on the first box, then on the 2nd It's safe to tick most cache tickboxes Do not select Deep Scan Press Preview, and it will show you what it can delete. If you're happy, press Clean.
If you're happy, you can repeat using the root-mode version but be more careful.
There's also a tool called Baobab, which shows up on the menus as "Disk Usage Analyser". This scans directories and shows you what's the biggest. It may help point you at the disk-hogs.
Hope that helps. Don't delete stuff if you're not sure. Backup first, be careful etc etc
I'm not here very often currently, so if you ask a question about this, please also cc me in.
Cheers Steve
On 13/11/2018 18:17, steve-ALUG@hst.me.uk wrote:
On 09/11/18 19:30, Bev Nicolson wrote:
- Noticing that this PC gets glacially slow occasionally (it probably
means get a new one and soon but bear with me for the moment) I had a look at the hard disk. 77 GB is 84.4% full. I have two partitions though. One 'extended partition', the other a swap partition. Both 3.1
<snip>
- What is it full of and how could I clear stuff out, again, safely?
Temporary files. Cruft.
Sorry - glib answers. Firstly, if you keep your machine up-to-date on updates, but don't tidy it up, you are likely to have lots of old kernel files installed. It's easy to see this if you have the synaptic package manager installed. (apt-get install synaptic if you haven't!) start synaptic. On the left hand side select the line saying "Installed" Scroll the right-hand list until you get to entries listed linux. You will probably find entries listed linux-headers, linux-modules and linux-image and possibly linux-tools. These are followed by a version number. These numbers are linux version numbers.
I seem to have an inordinately large amount of headers and images. See link to screenshot below. (Hopefully.) Is this what you mean?
Bev.
On 14/11/18 06:19, Bev Nicolson wrote:
I seem to have an inordinately large amount of headers and images. See link to screenshot below. (Hopefully.) Is this what you mean?
Yes, absolutely. Every time you do an update and it updates "linux" (the system, rather than the other program files etc) it leaves the old version behind. If you've been updating the same machine for years, it will get full.
If you are confident you can identify the old versions, delete some of them. Make sure you leave the newest few behind, otherwise you will be left with a machine that doesn't boot. Also make sure that you're consistent.
On the screenshot, it seems like linux-image-3.13.0-87-generic is the most recent (at least on that screen). Assuming it is, I would keep it, and linux-image-3.13.0-86-generic and linux-image-3.13.0-85-generic and delete the rest.
PROVISO I think it makes sense to have a consistent set across the program names
linux-headers1 linux-headers2 linux-headers3 linux-modules1 linux-modules2 linux-image1 linux-image2 linux-image3 linux-tools1 linux-tools2 linux-tools3
If you had something like the above, I would think it's save to delete the v1 files, but leave the v2 and v3. In my contrived example, linux-modules highest version is 2.
Anyway, try with the really eldest. Note some of your files on the screenshot don't have the ubuntu orange circle next to them. That's a big hint that they're not part of the current version of ubuntu's core set of installed files, and possibly OK to delete them.
Hope that helps. Steve
Cheers Steve
On 15/11/2018 15:47, steve-ALUG@hst.me.uk wrote:
On 14/11/18 06:19, Bev Nicolson wrote:
I seem to have an inordinately large amount of headers and images. See link to screenshot below. (Hopefully.) Is this what you mean?
<snip>
Anyway, try with the really eldest. Note some of your files on the screenshot don't have the ubuntu orange circle next to them. That's a big hint that they're not part of the current version of ubuntu's core set of installed files, and possibly OK to delete them.
Hope that helps. Steve
Now have 77% free. I've pruned carefully, I hope. 15GB free still seems too little but scything through everything would not be wise.
Bev.
On 17/11/18 20:38, Bev Nicolson wrote:
Now have 77% free. I've pruned carefully, I hope. 15GB free still seems too little but scything through everything would not be wise.
Bev.
Mangled that. 77% full. 17GB free (now) That's what I meant. Thanks, Steve.
Bev.
Glad I could help.
I now suggest you try the other tools like Baobab (on the menu as "Disk Usage Analyser") and Bleach Bit. Baobab will show you which directories hold the most files. BleachBit may be able to get rid of some cr@p for you.
bin, sbin, usr, lib, opt - Installed Programs live here. To reduce used space, uninstall unnecessary programs etc - config files. shouldn't take up much space. Probably best to leave. home - all files belonging to your users, pictures, documents, some config files etc. boot - kernel images, bootup files etc. run, dev, proc - here be dragons. Temporary files, system files. Don't touch. tmp - in theory these are all temporary files. There shouldn't be much in here. If there is, say. var - all sorts of things live here. Some you can touch, some you shouldn't. There is scope for log files in /var/log to get huge. You could delete old ones. /var/tmp should be temporary files like /tmp. Probably best to leave the rest of /var alone.
Hope that helps Steve