Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [disk-cleanup]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
166 views

How to clean up a Linux system to free up disk space?

What are some generic ways to free up lots of storage space without deleting personal files? I'm doing a distro upgrade (Debian11->12) and it needs lots of disk space on the root partition / which ...
mYnDstrEAm's user avatar
  • 4,340
0 votes
1 answer
247 views

What is the difference between yay -Sc and yay -Scc?

I have seen seen people online use yay -Sc, but I have also seen people use yay -Scc What is the difference? There is a man page segment for yay -Sc: -Sc Yay will also clean cached AUR package ...
Maximilian Ballard's user avatar
0 votes
1 answer
929 views

GCP /dev/sda1/ Disk Space Full, Shows 90% In Use, but Mounting SDA1 only showing 6GB. What is using all my space?

I'm running Wordpress instance on top of a Linux GCP VM instance. In SSH, running cmd 'df -h' I see /dev/sda1 is 91% used up. I mounted sda1 to see what could be taking up all the space, but ...
PlezHelp's user avatar
-1 votes
1 answer
583 views

How to quickly and securly erase data on a disk?

I'm going to securely erase the data on a HDD so that I can donate it. I use shred which is a specialized the tool for this puprose. So I run shred -vfz /dev/sdd1 and it does its job: shred: /dev/...
blnks's user avatar
  • 219
0 votes
1 answer
173 views

How to release the disk space of Linux home directory under another system

I have a SSD with an Ubuntu system, but for some reason the disk space is full. Now it is impossible to enter the system normally. How can I release disk space and reenter the system normally? This ...
LingChuan_Struggler's user avatar
2 votes
0 answers
864 views

ClamAV's main.cld file is too large - can it be removed or compressed?

The main.cld file in /var/lib/clamav/ is over 400 MB in size and daily.cld is over 150 MB. Are these filesizes normal and can these files be made smaller somehow? For example, by deleting them and ...
mYnDstrEAm's user avatar
  • 4,340
0 votes
1 answer
2k views

How to clean up flatpak files in ~/.local/share/flatpak/repo/objects/?

flatpak list shows me that I only have one app and Freedesktop.org Software Development Kit (probably dependency for that app; ca 900MB) installed with flatpak and flatpak uninstall --unused returns ...
mYnDstrEAm's user avatar
  • 4,340
0 votes
1 answer
6k views

How to clean "/dev/mapper/rootvg-root_lv" after YUM?

I run Yum update on CentOS and suddenly i got disk space hike on /dev/mapper/rootvg-root_lv [intor@alp-pp03 ~]$ df -h Filesystem Size Used Avail Use% Mounted on devtmpfs ...
fatherazrael's user avatar
0 votes
0 answers
2k views

How to move log files in /var/log/journal to free disk space without losing logs?

I'd like to later check if there is a way / software to easily scan logs for issues one should look into² and if such exists scan all logs, including old logs. This is why for now I'd like to keep the ...
mYnDstrEAm's user avatar
  • 4,340
3 votes
0 answers
5k views

When to clean up /var/tmp?

/var/tmp is not defined in POSIX, but is defined in FHS: 5.15. /var/tmp : Temporary files preserved between system reboots 5.15.1. Purpose The /var/tmp directory is made available for programs that ...
Jonas Stein's user avatar
  • 4,108
0 votes
1 answer
104 views

Filelight /home in /usr/share

I needed to remove some files in / and I noticed I have a folder /home/myusername in /usr/share whereas no such folder appear when I list the directoty, symbolik link or else in /usr/share. What could ...
Smilia's user avatar
  • 310
2 votes
2 answers
2k views

Is it safe to remove contents from var / swapfile / tmp?

The thing is /home has only used 11GB whereas /var uses 14GB, /temp 11GB and /swapfile 2.4GB Can I safely do sudo rm * in the last three directories? Contents from sudo du /var | sort -n | tail -20 ...
Josh's user avatar
  • 121
-2 votes
1 answer
242 views

How to identify and remove packages no longer in use? [closed]

For some reason I have installed a lot of packages on my Linux distros (Fedora/CentOS/Debian/Ubuntu/Arch/...). Some of them are only for one-time use. But they will be included for upgrade whenever I ...
Cyker's user avatar
  • 4,314
2 votes
2 answers
120 views

Switching from Win10 to Linux: AV, defrag, disk cleanup tools, etc [closed]

I installed Linux Mint on my desktop in place of Windows 10. I am used to having virus/malware Scanners, defragmenters, Disk Clean up tools etc. I was wondering if people here would be able to ...
SupGen's user avatar
  • 51
0 votes
2 answers
3k views

How do I cleanup a boot partition that can't be cleaned up with package-cleanup?

I recently reinstalled CentOS 7 on a lab/development machine. I wanted to keep the /home partition from the previous installation, so I manually configured the partitioning to allow me to do that. In ...
scottbb's user avatar
  • 558
5 votes
2 answers
1k views

Is there a good reason to keep some files in $HOME/.cache when backing up?

I'm about to back up some parts of my filesystem, including my home directory. I'm looking at $HOME/.cache, and wondering what I should do with it. I know that it's safe to just delete it altogether, ...
einpoklum's user avatar
  • 9,585
1 vote
2 answers
2k views

How to identify and remove orphaned config files of uninstalled Software?

Programs often store config files in the home directory usually in a hidden directory, often but not limited to sub-directories of ~/.config, ~/.local or ~/.gnome After uninstalling the programs, the ...
dynobo's user avatar
  • 111
4 votes
2 answers
433 views

Restore a USB flash drive in a standard state for use in Linux, Windows, etc

Since this question, I'm using: dd if=/dev/zero of=/dev/sdb bs=1M # wipe the disk fdisk /dev/sdb <<< $'n\np\n\n\n\nt\nb\np\nw\n' # create a partition mkfs.fat /dev/sdb1 ...
Basj's user avatar
  • 2,549
0 votes
2 answers
940 views

Wipe a USB flash drive and recreate a filesystem

I'm using this to wipe a USB flash drive and recreate a FAT filesystem: dd if=/dev/zero of=/dev/sdb bs=1M #I don't need more advanced wiping fdisk /dev/sdb (a few keystrokes to select partition ...
Basj's user avatar
  • 2,549
2 votes
2 answers
1k views

Convert identical files to hardlinks [duplicate]

I have a lot of music in a tree under one directory, saved in whatever format I initially got it in, for quality. I have a second directory tree which is similar in structure, but with all files in a ...
Vivian's user avatar
  • 317
-2 votes
1 answer
696 views

Root filesystem full because /platform directory

I have a solaris 10 server. The / filesystem is full beacuse the /platform directory. What type of files resides in that directory? Can I delete those files?
afl's user avatar
  • 69
0 votes
1 answer
846 views

ramdisk, how to clean every x min files older than X min

To setup a cron job to purge outdated cache files that are more than 8 minutes old every 10 minutes on disk its an easy task. # crontab -e */10 * * * * root find /tmp/diskcache -type f -mmin +8 -...
Matteus's user avatar
0 votes
1 answer
61 views

Debian 8.6 - Large file at root called EMPTY

Recently I've been doing some maintenance on a cloud-hosted server I run. My host is DreamHost, specifically their DreamCompute service and the server is running Debian 8.6. While cleaning up old ...
M. Damian Mulligan's user avatar
3 votes
2 answers
2k views

Lots of missing files in debsums output

I run debsums -cs in a machine running Debian Jessie. The output is lots of missing files. Lots of them (maybe all) has some sort of locale two letters code (like zh, fr, de, and so on). I have run ...
Pierre B's user avatar
  • 2,223
-2 votes
1 answer
130 views

Java code for exam [closed]

import java.io.*; class B_13 { public static void main(String[] args)throws Antifundamentalist,UnsupportedEncodingException { File file = new File("/rr"); String[] myFiles; int ...
Fusionist's user avatar
6 votes
1 answer
408 views

Remove unnecessary configuration folders

Many applications create a hidden folder in /home/user. I've tested many applications that I later uninstalled. Is there a way to check which folders have been left behind in my home folder by ...
To Do's user avatar
  • 1,346
0 votes
2 answers
3k views

List all directories whose contents (files) have not been updated or accessed before a certain date?

Would like to easily located folders to archive/trash and an easy way to automate this would be to choose folders I haven't made any use of for years. Since folders themselves can have different ...
Jordan Reiter's user avatar
5 votes
1 answer
5k views

Completely remove remains of sysvinit

As opposed to people who want to get rid of systemd, I want to completely and safely remove sysvinit. I've been using Debian since Debian 7.0 (Wheezy). Currently I'm using Debian 9.0 (Stretch). ...
patryk.beza's user avatar
  • 1,189
1 vote
2 answers
1k views

Linux tools for deleting backups when they get too old?

I was looking at SQL Server 2000 today, and it has an argument in the EXECUTE command called -DelBkUps for deleting backups that are of a certain age. Does Linux have any tools for deleting backups ...
leeand00's user avatar
  • 4,615
0 votes
1 answer
941 views

How to remount filesystem at logout?

I need to clear tmpfs after each logout from system (Ubuntu x86_64).
vinegret's user avatar
1 vote
1 answer
1k views

How to list down all useless or less used files or application in my linux server?

I want to clean cruft from my Oracle Linux server. For this, I need to know which application or directory isn't used or is hardly ever accessed. Is there any command or way to list directories or ...
ursitesion's user avatar
  • 1,007
10 votes
7 answers
3k views

How to tidy up the .keywords file on a gentoo system?

One can select testing packages on a gentoo stable system by adding a line with the following syntax to keywords list: cat /etc/portage/package.keywords =dev-python/ipython-0.13.2 ~amd64 # and many ...
Jonas Stein's user avatar
  • 4,108
4 votes
1 answer
333 views

Remote script cleaning up

I run a remote script using ssh: local script: local_command ssh -p 222 user@server 'sh -s' < ./remote_run.sh remote script: some_command & sleep 10000 trap 'echo exiting' SIGINT SIGTERM ...
Dmitry Eskin's user avatar
332 votes
3 answers
243k views

Can I remove files in /var/log/journal and /var/cache/abrt-di/usr?

I use Fedora and these directories contains a large amount of files, I wonder whether I can delete them? The system is running low on space.
hgajshb's user avatar
  • 3,875
1 vote
2 answers
2k views

Remove first instance of lines with duplicate field value

I have sha1 summed all the image files on my storage server and put the results in a text file in the form of: sha1sum filename I've sorted the file and removed all all unique sha1sum entries. So ...
Graeme Russ's user avatar