LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   disk drive space creeping up on its own... (https://www.linuxquestions.org/questions/linux-newbie-8/disk-drive-space-creeping-up-on-its-own-4175591069/)

dbc254 10-09-2016 09:00 AM

disk drive space creeping up on its own...
 
When you have a 120gb SSD you keep an eye on such things. Still 85gb+ free, but watching that slowly get eaten away buy who knows what. I'm not downloading anything that I leave on the drive with the exception of the occasional jpg. Usually motorcycles or drums... No games or movies or anything of the "larger" variety.

What gives!?!?!

Linux Mint 18 here.

Keruskerfuerst 10-09-2016 09:11 AM

On console:
du
df

dbc254 10-09-2016 09:28 AM

df displayed a lot of cache files in directories I can't see using the GUI. ./.cache/google-chrome/

How can I get rid of these files if they're just cached versions of stuff I don't even need?

Shadow_7 10-09-2016 11:03 AM

$ du -h --max-depth=1 /home/

$ du -h --max-depth=1 /tmp/

$ du -h --max-depth=1 /var/log/

for debian based distros

$ du -h /var/cache/apt/archives/

When you update via the CLI, the downloaded packages that get installed don't always go away. Once they're installed you can safely rm those files IMO. But mostly I archive the install to a large disk and do a fresh install to reclaim space. Part paranoia, part keeping my install skills fresh. Not much worse than going somewhere on a fresh install and realizing that you didn't install the wireless networking tools.

JeremyBoden 10-11-2016 07:17 AM

For Debian distros, it is always safe to remove downloads of packages (after installation).
Run as root,
Code:

apt-get clean

pan64 10-11-2016 07:19 AM

Quote:

Originally Posted by dbc254 (Post 5615753)
df displayed a lot of cache files in directories I can't see using the GUI. ./.cache/google-chrome/

How can I get rid of these files if they're just cached versions of stuff I don't even need?

Probably you can remove it, but chrome can be configured to put it into another dir and I think also the (max) size can be specified.

rnturn 10-11-2016 08:06 AM

Does that disk have btrfs filesystems on it?
 
The snapshotting that btrfs does will slowly use up disk space. You can clean out your browser cache all you want but the snapshots will still be there. And they hang around for a while.

jhonmaria45 10-11-2016 08:11 AM

You can remove it, but you need cto clear all your browser cache

JeremyBoden 10-11-2016 09:16 AM

Lots of random writes aren't good for SSD's.

sundialsvcs 10-11-2016 02:54 PM

Try the lsof ("list open files") command.

My guess is that you probably have some kind of daemon that is continuously writing to some file, without ever closing it. Thus, the file's directory-entry is never being updated, and so it is not readily apparent where the disk space is going.

(Incidentally, this issue is common to most operating systems ...)

The odds are also reasonable that this behavior, while as-yet unexplained to you, is probably benign.

linux4evr5581 10-11-2016 03:28 PM

You can also use a chroot jail to whitelist or blacklist any program. Though nothing stops a process from editing it own memory and escaping from the jail.

BW-userx 10-12-2016 07:37 AM

yeah to what they said, and as well, every time you update. Them updates can get a little bit bigger because of the added code in the file, which may only take a few kb but as you see it does add up over time. repeating others, tmp files, logs and such too is something to look at.

JJJCR 10-13-2016 10:31 PM

check the log files.

cd /var

check if any log files is consuming your space

TenTenths 10-14-2016 05:36 AM

Quote:

Originally Posted by JeremyBoden (Post 5616494)
Lots of random writes aren't good for SSD's.

On modern SSDs this is less of an issue than it used to be in the past.

BW-userx 10-14-2016 07:59 AM

SSD? do you trim your drive at least once a week?

mark_alfred 10-17-2016 09:59 AM

In whatever browser you use (like Firefox or Chromium or Chrome or whatever) make sure to clear the cache. In Firefox, it's found at History/Clear Recent History... <-- this gives the option to clear all your history (you may wish to preserve cookies and logins, but the cache should be cleared.)

Also, run the following commands in your terminal/console:

Code:

sudo apt autoclean && sudo apt autoremove
Note, if these commands do not work, then try what's below. The commands above are the newer updated commands in Ubuntu, though maybe Mint still uses the older "apt-get" command. If so, try what's below:

Code:

sudo apt-get autoclean && sudo apt-get autoremove
This should free up some space. Some of the other suggestions made before by those with more knowledge than I are likely also helpful. Good luck.

JeremyBoden 10-17-2016 10:29 AM

It's worth running the autoclean command every month or two or after you've performed a major update to your system.

Shadow_7 10-17-2016 09:30 PM

I tend to take a more manual method.

# dpkg -l | grep -v ^ii

# dpkg --purge --force-all <the packages no longer fully installed>

Until the list is short or gone, then:

# deborphan

Then remove the things not a kernel or bootloader. And of course:

# rm -rf /var/cache/apt/archives/*.*deb

But I'm normally on debian stable which doesn't have many updates beyond security updates. So not something that I do, except at the end of a fresh install, or every six or more months of running a distro. Although I tend towards quarterly fresh installs these days. In a post Snowden world. Plus a lot of times a fresh install is lower bandwidth than an update.


All times are GMT -5. The time now is 08:55 PM.