Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
my diskspace in linux is all occupied , no more free disk space, I want to free some disk space but I dont know what is safe to delete , I dont know what folders are dedicated to linux os , I know I folder I use , but others I want to delete , deleting these folder should not impact linux os .
please advice me
here is the folder by size
[root@ACFAS12 /]# du -sh * |sort
0 misc
0 net
0 proc
0 sys
11G pkg
12K u02
1.3G root
141M etc
16K lost+found
16M boot
199M lib
21M lib64
2.5G usr
31M sbin
3.2G opt
4.0K media
4.0K selinux
4.0K srv
4.0K svn_backup
4.1G var
520K tmp
7.6G home
7.6M bin
77M u01
8.0K mnt
88K dev
can I delete the Pkg folder ? is this linux specific or user created ?
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,673
Rep:
What distribution are you running? Do you want to remove data (pictures/documents/music, etc) or Linux applications? You can't just delete a directory in Linux or you're asking for trouble.
If you can clear out data, it should be in your /home directory. If you want to remove applications I'd use whatever package manager your distribution uses; yast for SUSE, Synaptics for Debian based Distros, eg, Ubuntu. This would allow you to remove the software cleanly. You can also tidy up by removing browser histoey files and cookies (not a lot of space freed off really)
Play Bonny!
Last edited by Soadyheid; 02-13-2012 at 10:58 AM.
Reason: spellnig!
CentOS uses 'Yellow dog Updater, Modified (Yum)' as package manager. you should try uninstalling something with it. usually, on every modern OS you use same program for installing and uninstalling software.
There is also an option to use filesystem that can compress /usr and similar, but that sounds complex to me (never used it).
A $99 replacement hard drive would solve your problem (and give you lots of room to grow).
You can free up a gigabyte here and there by clearing log files, package caches, etc.; but it will not solve the underlying problem: your drive will eventually fill back up again, and searching for files to safely delete will become a weekly/monthly frustration.
You might want to tune up logrotate, which should be purging your logfiles under /var.
You may be retaining more files than you want.
Check carefully what yum says it is going to delete before confirming or you may break your system.
As snowpine said though, disks these days are very cheap; I think the default is prob 500GB, maybe 1TB by now.
PS: that pkg dir is non-std; can you do an ls in there.
Did you setup this system yourself?
Does it normally have internet access?
It's possible that whoever set it up copied the pkgs from the install media onto the HDD.
If you do have internet access normally, then that would be redundant.
HTH
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.