SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I needed to save space on an undersized / partition. I had had to move a (generous) swap file to /home. After backing up the full install, I
Deleted obsolete X fonts and video drivers.
Deleted /usr/doc/ (Saved 1.3G)
Deleted /usr/share/ (Saved 4.7G)
As I'm using XFCE, so I removed every kde package. (Saved 1.5G)
All estimates are approximate. I repeat, I have a full backup and this is an Arm box. Do any of you expect consequences from this surgery, and why? I have a vague nag in my head that some kde libs might actually be useful. . .
Deleting /usr/share was not very clever to be perfectly honest.
There is a lot of stuff placed in /usr/share that is required for the packages installed to operate correctly. One very simple example is /usr/share/terminfo or /usr/share/ca-certificates.
I would have been careful to remove /usr/share, maybe it contains some icons or sound files that you want in XFCE.
Myself I prefer to have a rather small / partition and keep /usr on its own partition. For you this might be a good time to creata an own partition for /usr and get space on / by moving things there. If you don't want to move everything below /usr there are also other candidates of directories suitable for having partitions of their own like /tmp, /var, /home and /opt. (I understand that you already have /home on a partition of its own). If your /usr/local is big it might also be a candidate for a partition of its own.
I also prefer XFCE, but sometimes run KDE applications like k3b and kdiff3.
Instead of deleting files or directories, I would prefer to remove packages to have a system with installed files that match what my package manager thinks is installed.
/usr/share is used for non executable assets in for various packages. This includes default configuration files and icons.
In particular, it holds the application launchers used by xdg compliant desktops, such as XFCE. Don't close your web browser.. because you won't be able to open it back up.
Right. I completely forgot about /usr/share fonts. Bad day for me, obviously.
It's no big deal, I can drop in an sdcard and reboot. The sdcard has boot priority and the complete system. The fonts I clean forgot. I genuinely didn't know so much other stuff was used, because I suppose so much of what's there is unused.
I can rsync /usr/share back over to the HD from the SDCard. It's backed up on disk as well. Thanks guys.
Last edited by business_kid; 10-20-2023 at 02:04 PM.
Remove unused packages, compress stuff you don't use much, and strip binaries that might have debug info (be careful of some like ocaml binaries you shouldn't strip). If you're desperate, you usually can remove shared libraries that are similar version. For example, if you have libwhatever.so.a.b.c, where a-c are integers, you can delete those that differ in position 'c' but not 'a' nor 'b'. Ex: libwhatever.so.1.2.20 and libwhatever.so.1.2.21 you could delete libwhatever.so.1.2.20. Make sure the short name symlink of the library points to the latest version.
Remove old Linux kernel sources, check for unruly caches and image thumbnails. Remove man pages in languages you don't use, or sections you don't care about. That /usr/share is going to hurt...
Thank you all for the replies and for steering me out of my mess.
Well I have my backed up /usr/share restored. Of course, with the day that was in it, the sdcard chose that exact moment to act up But my hard disk backup did the trick. I am writing this on my RazPi.
I'm not going to search for similarly-named libraries with slightly lower versions, because it's not worth the effort. This RazPi is on current, which changes. Updating one package could break several programs. /usr/doc is gone, as I have it upstairs. kde was installed as part of the '-xfce-' image With a full backup and a ~Current mirror, I can reinstall quicker than archiving. Normally, there's no point for an OS to save disk space. Minimum disk sizes are ever-increasing.
With RPi OS, the install was ~6G, so 25G for / looked plenty. I needed space for media. Debian Buster proved obnoxious and arm support was non-existent. Then Slarm64 & Slackware Aarch64 came along, which were different propositions.
I had 3G on / and no room for a swapfile. Slarm64 has a repo with utilities, other WMs, and browsers. Box64 even allows x86_64 stuff to run.
EDIT: I couldn't fulfill the screenshot request. I deleted /usr/share via ssh, and the X had fallen on it's sword by the time I came down
Instead of removing things, you can save over 1Gb by compressing the contents of /usr/doc and the kernel modules:
Code:
# for i in `find /usr/doc -type f`; do gzip $i; done
# for i in `find /lib/modules -type f -name '*.ko'`; do gzip $i; done
# depmod -a
Quote:
Originally Posted by 0XBF
Any downside to this other than some added decompressing time loading docs and modules at boot? Is the added time significant?
Just wondering why saving space like that isn't default.
I compress both modules and kernel-firmware files using xz. But I don't use initrd. mkinitrd does not copy compressed modules or firmware files to the initrd.
Good of you to be exercising your minds on this. I did settle on a fix.
I have removed some obvious crud: kde; /usr/doc; never installed HOWTOs or Emacs; As for programs - seamonkey & thunderbird; don't have libreoffice; Obsolete & foreign fonts; pci video drivers from the last millenium, are all gone. Reinstalled /usr/share.
After adding a few preferred programs, There's 5.6G on / with the swap file on /home. My swap file is 8G(!) because Zoom, and swap file usage on Zoom was ballooning on box64. I made that ultra-big for testing purposes. But PitSeb has added this 'SAVE_MEM' option which drastically cuts memory usage.
5.6GB is not great, but it will do. I have ≅115GB of videos on home currently. I can pull those off and repartition if needed. It just means 100G of copying.
Another thing is that Slarm64 images used provide a lean version of slackware, but it now comes with everything, so install size has increased.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.