Do You Really Need To Clean Mint.

bob466

Well-Known Member
Joined
Oct 22, 2020
Messages
1,995
Reaction score
1,572
Credits
14,472
The answer is no...Mint doesn't fill up with crap and doesn't slow down over time either but there are a few things you can do.

If you're a beginner to Linux Mint...there are a few safe Terminal commands you can run to give you peace of mind.
m01101.gif

I've collected these over a few years and hope these help.
Note...there are no defragging commands as there's no fragmentation in Linux and never defrag an SSD.

Get rid of packages that are no longer required and Old Kernels.

Code:
   Sudo apt-get autoremove

You can see the size of this cache with the command below:
Code:
sudo du -sh  /var/cache/apt

Now, you have two options to handle the cache.
Either remove only the outdated packages, like those superseded by a recent update, making them completely unnecessary.​

Code:
 Sudo apt-get autoclean
Or clean out the cache in its entirety (frees more disk space):
Code:
  sudo apt-get clean

Clean the thumbnail cache

You can check the size of thumbnail cache with the command below:
Code:
  du -sh ~/.cache/thumbnails
So it’s a good practice to clear the thumbnail cache every few months or so. The quickest way is to use the terminal:
Code:
  rm -rf ~/.cache/thumbnails/*

Trim all currently attached and mounted SSDrive partitions and to provide details
Code:
 sudo fstrim -av

Sometimes the journal can be unexpectedly large. To check the space the journal is taking, you can run:

du -sh /var/log/journal

To check journal disk usage…
sudo journalctl --disk-usage

To clean Journal Logs and set a size…
sudo journalctl --vacuum-size=100M


A few other things to do...Empty the Trash Bin...Remove excess Timeshift Snapshots...I keep just two.

Clear the updates cache…

Launch Synaptic Package Manager.

Panel of Synaptic: Settings - Preferences – Files

Select: Delete downloaded packages after installation

Press the button: Delete Cached Package Files

I always move Videos...Music...Files etc to an External HDD from time to time but the biggest items that take up Disk space are Virtual Machines which you can Export if you wish...it's advisable to always keep 20% of Disk Space free...I have a 500GB SSD and never let it go over 50% full because it takes longer to create an Image with Foxclone...Redorescue or Timeshift.
m0114.gif


Anyway I hope this helps people new to Linux Mint because that's what we're here for...it's really not that hard.
m1212.gif




















 
Last edited:


Trim all currently attached and mounted SSDrive partitions and to provide details
Code:
 sudo fstrim -av

A few other things to do...Empty the Trash Bin...Remove excess Timeshift Snapshots...I keep just two.
Most Linux distributions have a timer for fstrim now days to do that automatically if you have an ssd in your system, including Linux Mint.
Code:
systemctl list-unit-files| grep fstrim
fstrim.service                                               static          -
fstrim.timer                                                   enabled         enabled
You can configure Timeshift to how many of a certain type (Monthy, weekly, daily, etc) of snapshots you want to keep and it will automatically throw away anything more than what you have configured that you want to keep.
 
...and it will automatically throw away anything more than what you have configured that you want to keep.

Just a small qualification on that - if you use the Comments field in Timeshift, which I do frequently, since v19.1 (we are currently mostly on 22.11) it will not cull those, by design.

So if you want to clean up and recover space, you may have to do so manually.

Cheers

Wizard
 
Just a small qualification on that - if you use the Comments field in Timeshift, which I do frequently, since v19.1 (we are currently mostly on 22.11) it will not cull those, by design.
I don't use the comment section for my snapshots in Timeshift since I have them create automatically, I only have 4 snapshots that I keep.
Screenshot_20230206_090856.png
 
Most Linux distributions have a timer for fstrim now days to do that automatically if you have an ssd in your system, including Linux Mint.

When I do a clean install I always optimize my SSD and I have Trim set to daily but what about Portable SSDs...so every now and then when I plug in my Portable SSD I'll run that command.
m1213.gif
 
The answer is no...Mint doesn't fill up with crap and doesn't slow down over time either but there are a few things you can do.

If you're a beginner to Linux Mint...there are a few safe Terminal commands you can run to give you peace of mind.
m01101.gif

I've collected these over a few years and hope these help.
Note...there are no defragging commands as there's no fragmentation in Linux and never defrag an SSD.

Get rid of packages that are no longer required and Old Kernels.

Code:
   Sudo apt-get autoremove

You can see the size of this cache with the command below:
Code:
sudo du -sh  /var/cache/apt

Now, you have two options to handle the cache.
Either remove only the outdated packages, like those superseded by a recent update, making them completely unnecessary.​

Code:
 Sudo apt-get autoclean
Or clean out the cache in its entirety (frees more disk space):
Code:
  sudo apt-get clean

Clean the thumbnail cache

You can check the size of thumbnail cache with the command below:
Code:
  du -sh ~/.cache/thumbnails
So it’s a good practice to clear the thumbnail cache every few months or so. The quickest way is to use the terminal:
Code:
  rm -rf ~/.cache/thumbnails/*

Trim all currently attached and mounted SSDrive partitions and to provide details
Code:
 sudo fstrim -av

A few other things to do...Empty the Trash Bin...Remove excess Timeshift Snapshots...I keep just two.

Clear the updates cache…

Launch Synaptic Package Manager.

Panel of Synaptic: Settings - Preferences – Files

Select: Delete downloaded packages after installation

Press the button: Delete Cached Package Files

I always move Videos...Music...Files etc to an External HDD from time to time but the biggest items that take up Disk space are Virtual Machines which you can Export if you wish...it's advisable to always keep 20% of Disk Space free...I have a 500GB SSD and never let it go over 50% full because it takes longer to create an Image with Foxclone or Macrium Rescue Media.
m0114.gif


Anyway I hope this helps people new to Linux Mint because that's what we're here for...it's really not that hard.
m1212.gif











Freed over 600MB of space. Yeehaw
 
A Good Thread, Bob
 

Members online


Top