After installing pacman packages (last one was ‘ungoogled-chromium’) my root partition of 20GB is completly full. Now I can’t update new packages.
My partition structure is: root (20GB) /home (470GB) swap (10GB)
How can I delete the garbage that is piling up in my root, and how to prevent it from happening again.
Yote.zip ( @yote_zip@pawb.social ) English11•1 year agoRun
ncdu
(CLI) or Filelight (GUI) on your/
and see what’s taking up all that space first, then we can figure out what to do about it.This realy helped my out. /var/cache/pacman took up over 5GB of space in my root partition. To prevent this from happening again, is there a way to move pacman cache to my home partition where I have over 300GB of space for pacman to consume?
Yote.zip ( @yote_zip@pawb.social ) English5•1 year agoI’m not currently using Arch so I can’t test, but from this forum post it looks like you can change the
CacheDir
variable in/etc/pacman.conf
to point anywhere you want.Yes, this did work! Thanks for your help!
giacomo ( @giacomo@lemm.ee ) 1•1 year agoCould you create a new partition out of that 300 for /var?
LiveLM ( @LiveLM@lemmy.zip ) English11•1 year agoClean up your AUR cache!
noddy ( @noddy@beehaw.org ) 8•1 year agoAlso pacman cache.
Swiggles ( @Swiggles@lemmy.blahaj.zone ) 9•1 year agoSounds like you don’t clean your package cache. You can enable the paccache.timer to handle it for you on a weekly basis.
https://wiki.archlinux.org/title/pacman#Cleaning_the_package_cache
chevy9294 ( @chevy9294@monero.town ) 7•1 year agoTry uninstalling packages that are not required anymore:
sudo pacman -c
christophski ( @christophski@feddit.uk ) English6•1 year agoNot sure about arch but one thing I’ve found takes up a fair amount of space is older kernel versions that remain installed
wallmenis ( @wallmenis@lemmy.one ) English5•1 year agoOne quick suggestion is running
sudo pacman -Sc
. Also switch to flatpak on some apps since these are stored in /home. If these don’t work/are not suitable to your situation, give more information like mentioned on the other comments. lemmyvore ( @lemmyvore@feddit.nl ) English5•1 year agoIn addition to everything else, if you’re not using hibernate you could reclaim some of the swap partition, 10 GB is completely wasted.
I would delete and merge the swap space into root if they’re neighbors. You can create swap files instead of any size you want, and place them anywhere you want, like /home.
I would recommend starting with 1 GB of swap and see how much is actually being used.
To create and use a swap file:
- Use
dd if=/dev/zero of=/swapfile bs=1M count=1024
to create a file. - Use
mkswap
to format the swap file. - Use
swapon /swapfile
to activate it. - Add
/swapfile none swap sw 0 0
in/etc/fstab
to activate on every reboot.
- Use
SomeBoyo ( @SomeBoyo@feddit.de ) 3•1 year agoIf the other answers don’t help, you could increase your root partition’s size, with gparted. (do a backup of your important data before doing it)
Kristof12 ( @Kristof12@lemmy.ml ) 2•1 year agoMore space for root? kek
mrmojo ( @mrmojo@beehaw.org ) 2•1 year agoJust in case you use Docker, you should clean images and containers on disk. They usually live on the root partition and take huge amounts of space.
yum13241 ( @yum13241@lemm.ee ) 1•1 year agosudo pacman -Scc
Quill0 ( @Quill0@lemmy.digitalfall.net ) English1•1 year agoAny particular reason why you have root so small and an dedicated /home partition?
yum13241 ( @yum13241@lemm.ee ) 1•1 year agoBecause you don’t need to
dd
your entire /home partition to a drive, wipe your system drive, thendd
your /home back.
Bruno Finger ( @brunofin@lemm.ee ) 1•1 year agoNot sure if arch is too different, but Linux is Linux. I suggest you get any live distro you can such as Ubuntu or fedora on a live usb stick and boot into it, once in it run gparted (or first install it if not available) and simply resize your partitions around as in to allocate some space from your home partition to your root partition. Should be a fairly simple operation especially with an easy and intuitive GUI such as gparted.