Ask Dave Taylor
  • Facebook
  • Instagram
  • Linkedin
  • Pinterest
  • Twitter
  • YouTube
  • Home
  • YouTube Videos
  • Top Categories
  • Subscribe via Email
  • Ask A Question
  • Meet Dave
  • Home
  • Linux Help
  • Save Disk Space in Ubuntu Linux by Limiting File History

Save Disk Space in Ubuntu Linux by Limiting File History

April 20, 2023 / Dave Taylor / Linux Help / No Comments

I installed Ubuntu Linux on an old PC and it’s working great, but I keep running out of disk space. What’s my best move to try and slow down the disk usage creep I’m experiencing? Running the latest LTS version of Ubuntu, if that matters.

Like any operating system, Linux has a tendency to do useful things for the user that are sometimes at odds with the efficient running of the system itself. A common scenario is a system that will crank up the CPU to deliver more power – particularly for games – even though that has a corresponding deleterious effect on the battery life: Faster = less.

File version history is another area that is impacted by this, though for most users it’s invisible since modern disk drives are so darn big. If you have hundreds of gigabytes of free space and are editing papers for a college course throughout the semester, the extra disk space required is but a drop in the proverbial bucket. However, Ubuntu also has a bad habit of keeping the historical versions of all edited files forever, which means that over time it might well get unwieldy. Fortunately, there are some system settings to tame this File History beast, along with automatically removing temporary files. Let’s check it out…

UBUNTU LINUX SETTINGS

Launch Ubuntu, log in, then go to Settings. This is most easily accessed from the menu on the top right of the screen if you’re running a stock GNOME setup. You’ve probably already poked around in Settings so this should look familiar:

ubuntu linux - file history temporary files - settings

I tend to fiddle with the appearance of my own Ubuntu system, so that’s my default category. What we want is “Privacy” from the left column of options. That reveals…

ubuntu linux - file history temporary files - settings > privacy

If you’re on “Connectivity”, click on “File History & Trash” to get here. Now you can see that Ubuntu by default keeps historical copies of files you edit forever. Not great. Instead, you might want to set it to a specific duration.

HOW LONG TO KEEP FILE HISTORY

I wish there were longer options, but, as you can see, here are your choices:

ubuntu linux - file history temporary files - duration

Setting it to one day seems a bit risky, but 30 days is reasonable and gives you enough time to take off for a 2-week Spring Break adventure, get back, recover, then find out something’s happened to your file and you need to get a recovery copy!

If you don’t want to set a specific duration, set a reminder in your calendar to occasionally “Clear History…” (though it’s not clear whether that will clear all historical copies, even those just a few hours old, or honor the duration you specify).

I recommend 30 days coupled with an occasional off-computer backup of your most critical files. If you’re working on a dissertation or critical report, maybe email drafts to yourself occasionally as a cheap and easy redundant backup tactic.

EMPTY TRASH & DELETE TEMP FILES

While we’re on this Settings window, scroll down because there are two more settings that can affect the efficient use of your disk space over time: “Trash & Temporary Files“:

ubuntu linux - file history temporary files - trash & temp files

Without this enabled, your trash will accumulate every file you add, whether it’s a 35K data file or an enormous 2.9G movie. Over time it’s sure to be a problem. What’s interesting is that temporary files are managed separately – typically in /tmp or /usr/tmp – and can also just sit and sit, eating up disk space years after you’ve installed an update or run an app that crashes.

In this instance, there are a lot more options for how long these files should be saved before they are removed:

ubuntu linux - file history temporary files - how long to keep trash temp files

Unless you have a space crisis, I recommend no faster than 14 days for this particular automated task. Certainly, 1 hour is crazy fast and makes me anxious just thinking about it!

Finally, you can empty the trash immediately with “Empty Trash…”

ubuntu linux - file history temporary files - empty trash?

And, similarly, you can also delete all those temp files with “Delete Temporary Files…”

ubuntu linux - file history temporary files - delete all temp files?

Between them, these should help you clean up some of the junk on your Linux box and keep it clean into the future. Good luck!

Pro User Tip: I’ve been writing about Linux since the dawn of the operating system, and Unix before that. Please check out my extensive Linux help area for lots of additional tutorial content while you’re visiting. Thanks!

About the Author: Dave Taylor has been involved with the online world since the early days of the Internet. Author of over 20 technical books, he runs the popular AskDaveTaylor.com tech help site. You can also find his gadget reviews on YouTube and chat with him on Twitter as @DaveTaylor.

Let’s Stay In Touch!

Never miss a single article, review or tutorial here on AskDaveTaylor, sign up for my fun weekly newsletter!
Name: 
Your email address:*
Please enter all required fields
Correct invalid entries
No spam, ever. Promise. Powered by FeedBlitz
Please choose a color:
Starbucks coffee cup I do have a lot to say, and questions of my own for that matter, but first I'd like to say thank you, Dave, for all your helpful information by buying you a cup of coffee!
disk space, file history, temp files, ubuntu linux

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

Recent Posts

  • How to Set a Max Volume Limit on your Child’s iPhone
  • How To Try Out the AI-Powered Google Search Generative Experience (SGE)
  • How to Change Cover Screen Design on a Samsung Flip Phone
  • Access the New “Threads” Social Network via Computer?
  • How to Enable and Use “Split Screen” in Microsoft Edge

On Our YouTube Channel

FiiTii HiFiDots ANC TWS Earbuds -- DEMO & REVIEW

Kodak FLIK HD9 Smart Projector -- DEMO & REVIEW

Categories

  • AdSense, AdWords, and PPC Help (106)
  • Alexa, Kindle, and Nook Help (103)
  • Amazon, eBay, and Online Shopping Help (166)
  • Android Help (240)
  • Apple iPad Help (151)
  • Apple Watch & Smartwatch Help (56)
  • Articles, Tutorials, and Reviews (347)
  • Auto Tech Help (21)
  • Business Advice (201)
  • Chromebook & ChromeOS Help (47)
  • Computer & Internet Basics (796)
  • d) None of the Above (166)
  • Facebook Help (386)
  • Google, Chrome & Gmail Help (197)
  • HTML & Web Page Design (248)
  • Instagram & Threads Help (53)
  • iPhone & iOS Help (642)
  • iPod & MP3 Player Help (173)
  • LinkedIn Help (90)
  • Linux Help (178)
  • Linux Shell Script Programming (90)
  • Mac & MacOS Help (932)
  • Most Popular (16)
  • Outlook & Office 365 Help (41)
  • PayPal Help (68)
  • Pinterest Help (54)
  • Reddit Help (21)
  • SEO & Marketing (82)
  • Spam, Scams & Security (101)
  • Trade Show News & Updates (23)
  • Twitter Help (225)
  • Video Game Tips (66)
  • Web Site Traffic Tips (62)
  • Windows PC Help (978)
  • Wordpress Help (206)
  • Writing and Publishing (72)
  • YouTube Help (47)
  • YouTube Video Reviews (159)
  • Zoom, Skype & Video Chat Help (66)

Archives

Social Connections:

Ask Dave Taylor


Follow Me on Pinterest
Follow me on Twitter
Follow me on LinkedIn
Follow me on Instagram


AskDaveTaylor on Facebook



microsoft insider mvp


This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this site or on any linked site. Further, please note that by submitting a question or comment you're agreeing to our terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site. Our lawyer says "Thanks for your cooperation."
© 2023 by Dave Taylor. "Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.
Privacy Policy - Terms and Conditions - Accessibility Policy