Skip to main content
Topic: how many space for Root? (Read 1639 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

how many space for Root?

Hello,

I have 30 GB for Root, because it always sayed, that Linux do not need a lot of space.
Now my / is too small for update :(

How many space should I give that the space is enough for long time?

Thx TM
CPU: AMD Ryzen 7 4800H
GPU: NVIDIA GeForce GTX 1650 Ti mobile
loaded: amdgpu,ati,modesetting,nouveau
Kernel: up to date
DM: Xfce


Re: how many space for Root?

Reply #2
Hello,

I have 30 GB for Root, because it always sayed, that Linux do not need a lot of space.
Now my / is too small for update :(

How many space should I give that the space is enough for long time?

Thx TM


If you have a seperate home directory you can edit makepkg.conf to use a build directoryin your home directory after you create said directory?

You could clean out you cache?

30 should be plenty even if you game as most games go into home directory under steam.
Cat Herders of Linux

Re: how many space for Root?

Reply #3
I have 30 GB for Root, because it always sayed, that Linux do not need a lot of space.
Now my / is too small for update :(
This depends on your needs and installed software. 30 GB is usually quite enough. For Arch-based installation, 40 GB would be better choice if you like to think beforehead. It seems that pacman cache eats a lot of space on your root partition (this happens when you use your installation for a while). Try to clean pacman cache by running
Code: [Select]
sudo paccache -rk 3
Also, check your /var/log partition and delete unnecessary logs if they exist. In some cases, /var/log might be bloated with gigabytes of ridiculous stuff, you may delete it, but before that you should figure out what generates this stuff, the roots of this issue may lie deeper.

Personally, with an SSD/NVMe, I use a single btrfs partition for my root/home, and I store my data on an HDD, to where I make symlinks from my home folder. I install linux on btrfs subvolumes with automatic compression enabled, which allows me to have multiple linux installations just on a single partition, and this is good for anyone who suffers from distrohopping addiction.

Re: how many space for Root?

Reply #4
Hi,

thx. The Tipp to clean the logs is good!!

I don't have games and not very much spezial software. I cleaned the pacman cache but this was not enough.
So I extended the Root Partition to 50 GB.

Quote
If you have a seperate home directory you can edit makepkg.conf to use a build directoryin your home directory after you create said directory?
I don't know, what this means and I am not able to do that.
I have a separate /home. And all Datas are on a second nvme. Home ist nearly empty.


Quote
30 should be plenty even if you game as most games go into home directory under steam.
for that I was wondering why 30 GB not enough. Because I have no Games, no VM and not much special Software.
OInly packages like, gimp, simple-scan, LO, TV Browser, PortfolioPerformance, Thunderbird and Firefox, Librewolf an tor.


Personally, with an SSD/NVMe, I use a single btrfs partition for my root/home, and I store my data on an HDD, to where I make symlinks from my home folder. I install linux on btrfs subvolumes with automatic compression enabled, which allows me to have multiple linux installations just on a single partition, and this is good for anyone who suffers from distrohopping addiction.

Thank you @ all. I hope with 50 GB is now enough. Ohterwise I have reservated some free Space behind the root Partition, so that I can expand again.

I just was wondered that 30 GB is not enough for a little bit more than standard Installation.

Nice Weekend



CPU: AMD Ryzen 7 4800H
GPU: NVIDIA GeForce GTX 1650 Ti mobile
loaded: amdgpu,ati,modesetting,nouveau
Kernel: up to date
DM: Xfce

Re: how many space for Root?

Reply #5
Code: [Select]
$ cd /
$ sudo du -hs *
or
# du -hs *
list installed packages
$ pacman -Q
This might take a minute or two to complete, just leave it going while you do something else. Then if you see a dir taking lots of GB you can cd to that and repeat, and hopefully work out what is taking up the space if you were concerned something unusual was going on. It could be you have a lot of large packages but my installs would use less than 10GB or so. Looking at the packages you have installed might show if you had anything you had forgotten about too.

Re: how many space for Root?

Reply #6
To clarify, only if you were adding packages from the aur that you were building from source would you need to think about editing your /etc/makepkg.conf file.  Seems like that's  not what you are doing.

They told you how to clean out cache for Paxman.

And you're not gaming.

So nothing I said is relevant
Cat Herders of Linux

Re: how many space for Root?

Reply #7
Then if you see a dir taking lots of GB you can cd to that and repeat, and hopefully work out what is taking up the space if you were concerned something unusual was going on. It could be you have a lot of large packages but my installs would use less than 10GB or so. Looking at the packages you have installed might show if you had anything you had forgotten about too.

Thx.  Good Tipp.
22M   /etc
2,3G   /var
6,6G   /usr
2,0G   /usr/share
76M   /var/log
94M   /opt

So I have to check especially the /usr

@cat herders of linux
AUR I do not have a lot Packages. 
My brother printer, , TV-browser and aisleriot (Cardgames)  They have together 22 MB
orage, and  archlinux-java-run (but I don't know why) ca. 6 MB
I quess java was installed with tv-browser

Quote
you need to think about editing your /etc/makepkg.conf file. 
I am not able to do this.

This is my /etc/makepkg.conf
Code: [Select]
#!/hint/bash
#
# /etc/makepkg.conf
#

#########################################################################
# SOURCE ACQUISITION
#########################################################################
#
#-- The download utilities that makepkg should use to acquire sources
#  Format: 'protocol::agent'
DLAGENTS=('file::/usr/bin/curl -qgC - -o %o %u'
          'ftp::/usr/bin/curl -qgfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
          'http::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
          'https::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
          'rsync::/usr/bin/rsync --no-motd -z %u %o'
          'scp::/usr/bin/scp -C %u %o')

# Other common tools:
# /usr/bin/snarf
# /usr/bin/lftpget -c
# /usr/bin/wget

#-- The package required by makepkg to download VCS sources
#  Format: 'protocol::package'
VCSCLIENTS=('bzr::bzr'
            'fossil::fossil'
            'git::git'
            'hg::mercurial'
            'svn::subversion')

#########################################################################
# ARCHITECTURE, COMPILE FLAGS
#########################################################################
#
CARCH="x86_64"
CHOST="x86_64-pc-linux-gnu"

#-- Compiler and Linker Flags
#CPPFLAGS=""
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions \
        -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
        -fstack-clash-protection -fcf-protection"
CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
LTOFLAGS="-flto=auto"
#RUSTFLAGS="-C opt-level=2"
#-- Make Flags: change this for DistCC/SMP systems
#MAKEFLAGS="-j2"
#-- Debugging flags
DEBUG_CFLAGS="-g"
DEBUG_CXXFLAGS="$DEBUG_CFLAGS"
#DEBUG_RUSTFLAGS="-C debuginfo=2"

#########################################################################
# BUILD ENVIRONMENT
#########################################################################
#
# Makepkg defaults: BUILDENV=(!distcc !color !ccache check !sign)
#  A negated environment option will do the opposite of the comments below.
#
#-- distcc:   Use the Distributed C/C++/ObjC compiler
#-- color:    Colorize output messages
#-- ccache:   Use ccache to cache compilation
#-- check:    Run the check() function if present in the PKGBUILD
#-- sign:     Generate PGP signature file
#
BUILDENV=(!distcc color !ccache check !sign)
#
#-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
#-- specify a space-delimited list of hosts running in the DistCC cluster.
#DISTCC_HOSTS=""
#
#-- Specify a directory for package building.
#BUILDDIR=/tmp/makepkg

#########################################################################
# GLOBAL PACKAGE OPTIONS
#   These are default values for the options=() settings
#########################################################################
#
# Makepkg defaults: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug !lto)
#  A negated option will do the opposite of the comments below.
#
#-- strip:      Strip symbols from binaries/libraries
#-- docs:       Save doc directories specified by DOC_DIRS
#-- libtool:    Leave libtool (.la) files in packages
#-- staticlibs: Leave static library (.a) files in packages
#-- emptydirs:  Leave empty directories in packages
#-- zipman:     Compress manual (man and info) pages in MAN_DIRS with gzip
#-- purge:      Remove files specified by PURGE_TARGETS
#-- debug:      Add debugging flags as specified in DEBUG_* variables
#-- lto:        Add compile flags for building with link time optimization
#
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug !lto)

#-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2
INTEGRITY_CHECK=(sha256)
#-- Options to be used when stripping binaries. See `man strip' for details.
STRIP_BINARIES="--strip-all"
#-- Options to be used when stripping shared libraries. See `man strip' for details.
STRIP_SHARED="--strip-unneeded"
#-- Options to be used when stripping static libraries. See `man strip' for details.
STRIP_STATIC="--strip-debug"
#-- Manual (man and info) directories to compress (if zipman is specified)
MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
#-- Doc directories to remove (if !docs is specified)
DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
#-- Files to be removed from all packages (if purge is specified)
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
#-- Directory to store source code in for debug packages
DBGSRCDIR="/usr/src/debug"

#########################################################################
# PACKAGE OUTPUT
#########################################################################
#
# Default: put built package and cached source in build directory
#
#-- Destination: specify a fixed directory where all packages will be placed
#PKGDEST=/home/packages
#-- Source cache: specify a fixed directory where source files will be cached
#SRCDEST=/home/sources
#-- Source packages: specify a fixed directory where all src packages will be placed
#SRCPKGDEST=/home/srcpackages
#-- Log files: specify a fixed directory where all log files will be placed
#LOGDEST=/home/makepkglogs
#-- Packager: name/email of the person or organization building packages
#PACKAGER="John Doe <[email protected]>"
#-- Specify a key to use for package signing
#GPGKEY=""

#########################################################################
# COMPRESSION DEFAULTS
#########################################################################
#
COMPRESSGZ=(gzip -c -f -n)
COMPRESSBZ2=(bzip2 -c -f)
COMPRESSXZ=(xz -c -z -)
COMPRESSZST=(zstd -c -z -q -)
COMPRESSLRZ=(lrzip -q)
COMPRESSLZO=(lzop -q)
COMPRESSZ=(compress -c -f)
COMPRESSLZ4=(lz4 -q)
COMPRESSLZ=(lzip -c -f)

#########################################################################
# EXTENSION DEFAULTS
#########################################################################
#
PKGEXT='.pkg.tar.zst'
SRCEXT='.src.tar.gz'

#########################################################################
# OTHER
#########################################################################
#
#-- Command used to run pacman as root, instead of trying sudo and su
#PACMAN_AUTH=()


CPU: AMD Ryzen 7 4800H
GPU: NVIDIA GeForce GTX 1650 Ti mobile
loaded: amdgpu,ati,modesetting,nouveau
Kernel: up to date
DM: Xfce

Re: how many space for Root?

Reply #8
It also depends on how you use your system.
If you use Docker, faltpak, snap and maybe some other messy things than your /var might be full of that.


Re: how many space for Root?

Reply #10
There's also a TUI program galaxy/ncdu, which shows an interactive graph of disk usage.

This is great! Thx.

/usr/lib have 4 GB an /var/cache/pacman/pkg/ 2,1 GB
Should I after every update run
Code: [Select]
pacman -Scc]
CPU: AMD Ryzen 7 4800H
GPU: NVIDIA GeForce GTX 1650 Ti mobile
loaded: amdgpu,ati,modesetting,nouveau
Kernel: up to date
DM: Xfce

Re: how many space for Root?

Reply #11
Code: [Select]
$ cd /
$ sudo du -hs *
or
# du -hs *
list installed packages
$ pacman -Q
This might take a minute or two to complete, just leave it going while you do something else. Then if you see a dir taking lots of GB you can cd to that and repeat, and hopefully work out what is taking up the space if you were concerned something unusual was going on. It could be you have a lot of large packages but my installs would use less than 10GB or so. Looking at the packages you have installed might show if you had anything you had forgotten about too.

I suppose, if one runs out of space on a root partition, he should first of all check the /var/cache and /var/log directories. Those are major suspects to be bloated. There is no immediate need to check the whole system. Ordinary system files and resources in Linux are quite slender, and 20GB of disk space should be quite enough even for a bloated system with plenty of programs installed. Add another 10GB in order to have some free space on your root partition (when a filesystem runs out of space, it slows down and becomes inefficient), and you'll get those commonly recommended 30GB.

Re: how many space for Root?

Reply #12
22M   /etc
2,3G   /var
6,6G   /usr
2,0G   /usr/share
76M   /var/log
94M   /opt

That's a lot less than 30GB in total. Perhaps clearing the cache and logs fixed it earlier, and it required a reboot or something weird, or there could be something else going on, the /boot partition can run out of space for example if you have one.


Re: how many space for Root?

Reply #14
In addition to the good suggestions you received, you can also use graphical utilities like baobab or filelight to visualize the usage of your partitions.
I use conky for that purpose. It also visualizes various system info besides partition usage (most importantly, temperatures).