You are not logged in.

#1 2019-11-20 23:41:43

miomio
Member
Registered: 2016-01-17
Posts: 167

Clearing out root partition

As in the title, I've a 11GB / partition which has 60M free space, but have a ton of updates to do. How might I declutter /usr dir?:

1.4G	/usr/bin
16K	/usr/etc
217M	/usr/include
4.5G	/usr/lib
5.6M	/usr/lib32
0	/usr/lib64
40K	/usr/local
0	/usr/sbin
3.6G	/usr/share
4.0K	/usr/src

Last edited by miomio (2019-11-20 23:41:59)

Offline

#2 2019-11-20 23:42:52

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Clearing out root partition

paccache -h

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2019-11-20 23:57:54

miomio
Member
Registered: 2016-01-17
Posts: 167

Re: Clearing out root partition

This will clean /var/cache/pacman/pkg right?

`paccache -d -v`

pacsort: error while loading shared libraries: libalpm.so.12...

ls -la /usr/lib/libalpm.so*
lrwxrwxrwx 1 root root     17 Mar  1  2019 /usr/lib/libalpm.so -> libalpm.so.11.0.3
lrwxrwxrwx 1 root root     17 Mar  1  2019 /usr/lib/libalpm.so.11 -> libalpm.so.11.0.3
-rwxr-xr-x 1 root root 227720 Mar  1  2019 /usr/lib/libalpm.so.11.0.3


I think perhaps it might be better to install an older version of paccache rather than upgrading whatever package includes libalpm.so.12 since that would be partially upgrading.

$ paccache -d -v
==> no candidate packages found for pruning

Last edited by miomio (2019-11-21 00:08:26)

Offline

#4 2019-11-21 00:19:14

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,703

Re: Clearing out root partition

Just a guess, post the output of mount


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#5 2019-11-21 01:56:18

miomio
Member
Registered: 2016-01-17
Posts: 167

Re: Clearing out root partition

If paccache is to clean /var/cache/pacman/pkg then it will have no effect to the data on root since /var is a different disk partition than root. I've highlighted the folders on the root partition consuming the most space, above, i.e. /usr/{share,bin,lib}

Last edited by miomio (2019-11-21 01:58:09)

Offline

#6 2019-11-21 02:37:27

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,703

Re: Clearing out root partition

Well, you did not answer my question, but the moderator notes indicate that is not uncommon as well.  Nevermind.

The only thing that does not look reasonable is 5.6M    /usr/lib32
You might start there.

Point of reference, my root is 293G with 46G used.

Last edited by ewaller (2019-11-21 02:39:27)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#7 2019-11-21 02:44:11

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: Clearing out root partition

5.6M is very reasonable for /usr/lib32. Note that's M, not G.

Your /usr/bin and /usr/share are quite large, what's taking up the space there?

Last edited by Scimmia (2019-11-21 02:44:39)

Offline

#8 2019-11-21 19:27:45

miomio
Member
Registered: 2016-01-17
Posts: 167

Re: Clearing out root partition

ewaller wrote:

Well, you did not answer my question, but the moderator notes indicate that is not uncommon as well.  Nevermind.

Is your passive aggressive attitude why you're an admin? A: "no miomio, I'm looking for X in the output of `mount` to test Y. You have made an incorrect assumption that I was looking to see if the size of pacman's cache was the cause of root reaching its brim" is the response you meant?

Scimmia wrote:

Your /usr/bin and /usr/share are quite large, what's taking up the space there?

From what I can tell:

# du -sh /usr/share/* | sort -nr | grep -E "(M|G)"
961M	/usr/share/fonts
468M	/usr/share/texmf-dist
358M	/usr/share/locale
347M	/usr/share/doc
220M	/usr/share/qemu
118M	/usr/share/gtk-doc
116K	/usr/share/ImageMagick-7
110M	/usr/share/gimp
...

# du -sh /usr/bin/* | sort -nr | grep -E "(M|G)"
98M	/usr/bin/dockerd
81M	/usr/bin/docker
51M	/usr/bin/containerd
26M	/usr/bin/js60
26M	/usr/bin/ctr
25M	/usr/bin/node
24M	/usr/bin/containerd-stress
23M	/usr/bin/js52
18M	/usr/bin/qemu-system-aarch64
...
# du -sh /usr/share/fonts/* | sort -nr | grep -E "(M|G)"
368M	/usr/share/fonts/adobe-source-han-serif
332M	/usr/share/fonts/adobe-source-han-sans

I've underspec'd my root partition by about 15-20GB. Is it possible to resize (I am using dm-crypt+LUKS btw) ?

Edit: Ignore anything qemu related in the above as I've now removed qemu and docker which has freed 1.2G from root. But if I can keep going and get rid of anything else that's not necessary that'd be great.

Last edited by miomio (2019-11-21 19:35:25)

Offline

#9 2019-11-21 20:29:18

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,171

Re: Clearing out root partition

Resizability depends on whether you're also using LVM and if not, the actual partition layout (because you'll have to grow into some adjacent space) - you'll have to luksopen the partition to resize the FS
You can maybe collect some MB in useless locales, https://wiki.archlinux.org/index.php/Pa … _languages - other than that "necessary" is highly subjective.


ewaller is a moderator because he's allowed to read the … WAIT WHAT? THERE ARE MOD NOTES???
Also I'm pretty sure /he/ has read the board rules and while the mount list was rather not relevant here (as the /usr directory makes up for the brunt of  the 11GB) I'm fairly sure that he wasn't considering the pacman cache either, no.
(It's the typical answer to the question why "df" and "du" don't match up, though - but again: that's not this case)

Offline

Board footer

Powered by FluxBB