• Check it out - we have a chatbot! Go ask TuxBot a question in the Ask Tuxbot section!

Do You Really Need To Clean Mint.

bob466

Well-Known Member
Joined
Oct 22, 2020
Messages
847
Reaction score
614
Credits
6,323
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










 


f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
5,562
Reaction score
4,126
Credits
40,611
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.
 

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
8,392
Reaction score
7,296
Credits
33,477
...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
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
5,562
Reaction score
4,126
Credits
40,611
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
 
OP
bob466

bob466

Well-Known Member
Joined
Oct 22, 2020
Messages
847
Reaction score
614
Credits
6,323
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
 

mrcrossroads

Silver Member
Silver Supporter
Joined
Nov 23, 2017
Messages
337
Reaction score
296
Credits
1,946
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
 

Condobloke

Well-Known Member
Joined
Apr 30, 2017
Messages
5,895
Reaction score
4,904
Credits
36,842
A Good Thread, Bob
 
MALIBAL Linux Laptops

Linux Laptops Custom Built for You
MALIBAL is an innovative computer manufacturer that produces high-performance, custom laptops for Linux.

For more info, visit: https://www.malibal.com

Staff online

Members online


Latest posts

Top