this post was submitted on 27 Oct 2023
24 points (90.0% liked)

Linux

48145 readers
1108 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

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.

top 28 comments
sorted by: hot top controversial new old
[–] Roshakk@lemmy.world 18 points 1 year ago (1 children)

You can start to delete pachage caches, and see how much you gain... If not done often you can have a pile of old stuff. Check out the paccache arch wiki page for more info!

[–] c0mpost 9 points 1 year ago (1 children)

This. You might have to clear up some space before installing pacman-contrib though.

paccache -rk1 once in a while and you're good, maybe even create a hook

[–] Tw1@lemmy.roembol.nl 7 points 1 year ago (1 children)

Thanks! This realy helped me out. Saved 1GB on my root.

When I install things with pacman, is it storing files in the root partition? If so, can I specify installations to install inside the home partition?

Pacman installs binaries in the root partition because they are installed system-wide. I don't think that pacman can install binaries for a single user (inside the home partition).

One way of achieving that would be compiling or downloading the binaries manually as a normal user and putting the .desktop file in .local/share/applications. The program would then be only accessible for a single user though.

[–] Dr_Willis@sh.itjust.works 12 points 1 year ago (1 children)

check to see howuch space your log files are using.

to prevent it from happening ..

I would consider 20GB for / to be too small for long term desktop use.

and with just 470GB for /home, I would not split the two up.

[–] Tw1@lemmy.roembol.nl 5 points 1 year ago (2 children)

log files only took up 800MB, but I fixed most of the problems now, by setting up pacman to put the cache in the home partition.

You are right, it was better to leave /home in the same partition, but now it is difficult to chance that. I thought it had advantages when something goes wrong with my root i can swap it out, but it only caused problems for me. Why do so many people split up there /home then? I thought it was common practice.

[–] it_a_me@literature.cafe 4 points 1 year ago* (last edited 1 year ago)

The main advantage of having a /home partition is that you can easily preserve it during reinstalls or during a distro hop. Reinstalls used to be more common in the past when some distros didn't allow full distro upgrades without reinstalling. See this result which is still ranked #1 on duckduckgo

I personally use a @home btrfs subvolume which has most of the same advantages to me, and additionally allows @home and @root to share the same partition. It also allows me to use luks on everthing without bothering with lvm.

[–] VegaLyrae@kbin.social 2 points 1 year ago

Yes, typically with two entirely separate disks, not just partitions on the same physical disk.

[–] Swiggles@lemmy.blahaj.zone 12 points 1 year ago

Sounds 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

[–] LiveLM@lemmy.zip 11 points 1 year ago (1 children)
[–] noddy@beehaw.org 7 points 1 year ago

Also pacman cache.

[–] chevy9294@monero.town 7 points 1 year ago

Try uninstalling packages that are not required anymore: sudo pacman -c

[–] wmassingham@lemmy.world 6 points 1 year ago (1 children)

Delete some of the stuff you installed, and don't install more stuff than you have space for?

[–] Tw1@lemmy.roembol.nl 2 points 1 year ago (1 children)

To be clear, I have a home partition with over 300GB of free space left. Is there maybe a way to specify packages to be installed in my home partition instead of my root?

[–] errorinthread@lemmy.world 2 points 1 year ago

As people have mentioned there are alternate package managers that can provide this if you are concerned about resizing ur root partition and expect it to fill up again soon. Check out Guix, nix, or flatpaks (definitely the easiest to quickly setup )

[–] NorthWestWind@lemmy.world 6 points 1 year ago
[–] christophski@feddit.uk 5 points 1 year ago (1 children)

Not sure about arch but one thing I've found takes up a fair amount of space is older kernel versions that remain installed

[–] archy@lemmy.world 6 points 1 year ago

Nope, not the case in Arch

[–] SomeBoyo@feddit.de 4 points 1 year ago

If 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)

[–] wallmenis@lemmy.one 4 points 1 year ago

One 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@feddit.nl 4 points 1 year ago

In 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.
[–] p5f20w18k@lemmy.world 3 points 1 year ago

I had this issue so many times, I ended up re installing and having everything on 1 partition instead of separating root and home

[–] mrmojo@beehaw.org 2 points 1 year ago

Just 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.

[–] brunofin@lemm.ee 2 points 1 year ago

Not 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.

[–] Quill0@lemmy.digitalfall.net 1 points 1 year ago (1 children)

Any particular reason why you have root so small and an dedicated /home partition?

[–] yum13241@lemm.ee 1 points 1 year ago

Because you don't need to dd your entire /home partition to a drive, wipe your system drive, then dd your /home back.

[–] yum13241@lemm.ee 1 points 1 year ago
sudo pacman -Scc
[–] Kristof12@lemmy.ml 1 points 1 year ago

More space for root? kek