sudo isn’t necessary here - it’s your $HOME directory
it’s just 1 GB in size for me at the moment - so not much to be gained
1 GB at the most …
… do you have multiple partitions?
… or just one?
you might gain a little more if you do adjust the “reserved for “root” percentage”
which is 5% by default
sudo tune2fs -m1 /dev/sdXx
(whatever your device name is …)
see: man tune2fs
for more info on what that command does
Depending on the size of the HDD, the gain can be substantial
5% reserved for only root access
on a 1 TB disk
is quite a lot of unusable space … → in this case
the command above translates to: 50 GB …
or 40 GB more than you have available now …
and still have 10 GB for “root” exclusively - which is overkill still …
especially on a single user home system …
but the next iteration is -m0 (zero)
which then leaves no margin of error at all
and only leaves you with chroot from the outside to fix potential problems …
There are a few “running out of space” entries on this forum, so a search might produce additional ideas.
Any core dumps: coredumpctl (they can be removed or eliminated altogether).
journal disk usage: journalctl --disk-usage (can be managed). Other logs in /var/log are handled via logrotate.
pacman -Sc is done for the user automatically provided by Manjaro (see systemctl list-timers; It runs pamac clean the first Sat of the month. See man pamac.conf for description of KeepNumPackages (default 3)).
Regarding file size, I don’t install anything special, just use du, df, and find. Some desktop File Managers do better than others in this area.
An application needs what it needs, but having said that some applications don’t manage these resources very well, some produce excess messages when there is a problem, and files are left behind.
I look for files that haven’t been touched in awhile and files greater than 1G. Below the -printf could be replaced with -ls or removed entirely. If running on the root filesystem, a number of directories need to be pruned. I selectively remove files based on the results. Execute the last find command before and after you start your favorite application and see what files it is using. Examples below (see man find):
Any time using remove with the option recursive (-r) and the globbing character (*) be careful, and extra, extra careful if you are root (sudo).
I always list (ls) before and after. I want to know what I’m doing and then confirm what I thought I was doing. I use the up-arrow to recall the command from the bash history, ctl-a to get to the beginning of the line, and then with the cursor over ls I type alt-d and then rm. alt-d is kill-word. It may vary on your system. On bash (bind -P) will display key bindings for readline. Could also consider changing to the directory and then doing your remove. Maybe use the Desktop’s File Manager (click first file, hold the shift, click the last file, right-click, delete). After this command I would logoff/on.
How many kernels installed: mhwd-kernel -li
PS: Next time mention the desktop in use. Some times that helps to get additional/specific help.
I found in my case that aside of cleaning packages cache, the second thing was to limit journal size. By default, it grows and grows without limits, so after a few years it can use many GB of space. However, you can set in config to use 200 MB or less, so it will purge older data with time and keep it at that size.
I don’t remember the exact path to config, but it should be easily findable.
And the last space hog are apps themselves. Uninstall what you don’t need.
So to sum up:
Packages cache - clean up regularly, keep at most 2 last versions
Journal limit - set it once and forget
Uninstall what you don’t use, some apps can take a lot of space.
My experience tells, that the comfortable size of a system partition is at least 100 GB. Anything less will be problematic with time. Recommendations about 30GB are fairy tales. I had 30GB, and quickly I hit the wall, and had to increase the size of this partition. Rolling systems require a lot of space for constant updates (you download a lot), apps (with easy access to almost all apps, it’s easy to clutter the system) and journal - longer life (my system is running 7 years after the installation, so my journal size was huge, journal defaults on Manjaro are stupid, or at least they were stupid 7 years ago, maybe that has changed, I don’t know, it’s worth to check thou).
This setting limits systemd to the set value of log space and tell it to clean up the logs once in a while automatically, only keeping the most recent that fit in the given space. More info on all the log options in the config file and the defaults used.
Problem with emptying the caches, is that it will refill quickly so it is not a long term solution. Journals though take lot of space so that’s good to do (limit the size).
You can also use a toll like qdirstat from the AUR to inspect your home folder to see what is taking lot of space and decide then what to delete.
Keeping only one previous version of packages (or 0 if your don’t feel you’ll need to use your packages cache in the future) is also good to gain some space.
Links above for system maintenance is good, read it all, also the reserved space command above let me gain as in the example 40GB. You should already be able to gain lot of space by following everything here.