Cleaning /var/cache on Mint 19 Cinnamon

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
deepakdeshp
Level 20
Level 20
Posts: 12333
Joined: Sun Aug 09, 2015 10:00 am

Cleaning /var/cache on Mint 19 Cinnamon

Post by deepakdeshp »

Hello,
I plan to delete the contents of /var/cache on Mint 19 Cinnamon as part of cleaning up the system . It has 700MB data. I dont see any problems after deleting the contents.
PLease let me if there may be a problem. Thank you in advance.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
User avatar
thx-1138
Level 8
Level 8
Posts: 2092
Joined: Fri Mar 10, 2017 12:15 pm
Location: Athens, Greece

Re: Cleaning /var/cache on Mint 19 Cinnamon

Post by thx-1138 »

...to be on the safe side, only remove the packages under /var/cache/apt/archives/
Or just sudo apt-get autoremove && sudo apt-get autoclean && sudo apt-get clean...

Edit: Or even safer, just look at Pjotr's response / answer below via Synaptic...
In any case though, do not blindly remove all stuff below /var/cache...
Last edited by thx-1138 on Sun Jul 15, 2018 2:27 pm, edited 1 time in total.
User avatar
Flemur
Level 20
Level 20
Posts: 10097
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Cleaning /var/cache on Mint 19 Cinnamon

Post by Flemur »

deepakdeshp wrote: Sun Jul 15, 2018 2:11 pm Hello,
I plan to delete the contents of /var/cache on Mint 19 Cinnamon as part of cleaning up the system . It has 700MB data. I dont see any problems after deleting the contents.
PLease let me if there may be a problem. Thank you in advance.
You should probably stick to deleting
/var/cache/apt/archives/*.deb
because the other stuff (under /var/cache/apt) tells apt/synaptic/software-installer what you have and how it all hooks up.

Try this:

Code: Select all

du /var/cache -d 1 | sort -n
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
User avatar
Pjotr
Level 23
Level 23
Posts: 19802
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Cleaning /var/cache on Mint 19 Cinnamon

Post by Pjotr »

thx-1138 wrote: Sun Jul 15, 2018 2:18 pm ...to be on the safe side, only remove the packages under /var/cache/apt/archives/
Or just sudo apt-get autoremove && sudo apt-get autoclean && sudo apt-get clean...
That command is a bit drastic.... Less drastic, and therefore safer, is to use Synaptic:
https://sites.google.com/site/easylinux ... ates-cache
(item 2, left column)
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
User avatar
majpooper
Level 8
Level 8
Posts: 2076
Joined: Thu May 09, 2013 1:56 pm
Location: North Carolina, USA

Re: Cleaning /var/cache on Mint 19 Cinnamon

Post by majpooper »

I am away but when I get home I am going to do a test: I am going to see how much space I get cleaning my wife's PC. I have never cleaned my wife's PC since installing 18.3 late Jan of 2018 except for old kernels a couple of times because of all the kernel updates.

I have "played" with cleaning my PC in the past using all manner of approaches even using the cleaner whose name will not be mentioned - the results were always under-whelming. Essentially, other than cleaning out old kernels from time to time, I am of the opinion that cleaning really has little or no impact on the system and thus no worth the time and effort. I have installed linux for several family and friends including an elderly couple and never mention a need for them to "clean" their computers. I do stress applying updates however but have varying degrees of success with that especially kernel security updates - which I end up doing whenever I see them every few months. I just do not run into issues that require"cleaning."
User avatar
trytip
Level 14
Level 14
Posts: 5371
Joined: Tue Jul 05, 2016 1:20 pm

Re: Cleaning /var/cache on Mint 19 Cinnamon

Post by trytip »

just do a timeshift snapshot then delete what you want and reboot. i usually delete

var/cache/apt/archives/
var/cache/apt-xapian-index/
/var/cache/fontconfig/
var/cache/locate/

if you really want some space back use bleachbit and delete Localizations there's at least 300mb of extra languages of no use to me. you can also set updates to not download translations https://scarygliders.net/2012/04/01/qui ... s-indexes/
ps: in comments say maybe use your own translation only instead of "none" use "en"
Image
User avatar
all41
Level 19
Level 19
Posts: 9473
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Cleaning /var/cache on Mint 19 Cinnamon

Post by all41 »

Unless molested, the /var/cache/apt/archives directory contains all the changes you have made to your system, added programs, apt, Update Manager updates, etc.
With today's systems it doesn't require a lot of room (after years of use Mint 17.3 got up to only 1.5GB), so not only do I keep it, I back it up externally.
In the rare event I would have to revert to a reinstall I would not need to redownload those apps or updates again, so big time savings
as well as internet data for those that have metered data caps.

Another example: a recently converted neighbor wants me to install Mint 19 on his system, so I will carry /var/cache/apt/archives on a recently
updated usb stick and preload to this to his same directory. Then do apt update, open his Update Manager and turn it loose. UM will install the packages from /var/cache/apt/archives if the packages are there without re-downloading. He has a rather mediocre copper dsl connection, so this will expediate this install.

Point is:
If you need to clear that room on your hd it is safe to do so, but also good to offload to a usb or optical in case the unexpected happens.
Everything in life was difficult before it became easy.
Locked

Return to “Other topics”