Spring Cleaning Part 2: Clearing Up Your Home Directory

My empty OpenSolaris Desktop at work.

Yesterday, I cleaned up my home directory at work. I went from ca. 15 GB of data down to 1.1 GB. And I only stopped there, because I didn’t want to spend too much more time cleaning up. Here’s how to do it.

In the previous post of this mini-series, we looked at why it’s important to have our emails and files organized, then attacked our INBOX to reach zero-message-nirvana. I’m happy to see that others are living by these principles, too. Thanks, Gregor!

Now let’s look at that other dark spot in our IT lives: Our Desktop and file system. If you’re like me, you see this very often, too: Cluttered desktops with so many files and folders and downloads and icons and stuff, you can barely make out the underlying desktop background.

Some elevated this into an art form, but most of the time it’s really a burden on your productivity. Of course, the same applies to whatever files are sitting in your “Documents”, “Files” and other folders in your home directory.

How Files “Happen”

Let’s think about the possible reasons why you have files sitting on your Home Directory or Desktop (which is just a folder in your Home Directory anyway, so I’ll just refer to the former) in the first place. For every single file sitting on your Home Directory, I can only think of two possible reasons:

  1. You created it.

  2. You downloaded it.

It’s really that simple, there is no third option.

If you don’t recognize a particular file as having been created out of one of the above reasons, then it was created as a side effect of one of the two actions above (Like configuration files created by the application you created/downloaded something with).

Now let’s look at these two classes of files and decide what to do about them:

How to Handle Files You Created

So you created a new document/presentation/program/picture/song/whatever. Congratulations! Pat yourself on the back, because creativity is a precious gift.

There are two things you should do with all of the files you create:

  1. Share it! What’s the point of creating something new if nobody knows about it? Right. Make sure you share your self-created documents of any type with as many people as you can.

    Granted, there may be limits: Company-internal files often can’t be shared with the public. But I’m sure your company has an internal collaboration or file-sharing facility. For example, Sun people (and now Oracle people, too) are using SunSpace, and you can read a lot about it on Peter Reiser’s blog (no link, sun.com no longer exists). Others may be using a company internal Wiki or (brrr (German article)) Sharepoint or whatever.

    The point is, you have created that file for a reason, and most reasons include sharing your creation in some way or other. By sharing what you create on the net, you maximize its value to the communities you participate in and as a side effect, you make sure it can’t be lost again.

    Sharing is a great backup strategy.

    Blog about your stuff (I’ve started sharing my home server configuration scripts here and a reader already suggested I put them up on Github), upload it to YouTube, Flickr, Slideshare, your internal sharing systems or any other sharing platform of your choice. Just make sure your stuff is available on the net at any time.

  2. Back it up! Your own creations are precious, make sure they’re not lost. By sharing, you’ve already created a back up of your creation, but you probably want to make sure you have your own archive of your stuff, just in case.

    Backing up your data has never been easier. You can use an external USB drive (Either with TimeMachine on the Mac or some other backup mechanism of your choice) or you can back up your stuff on your home server. Or both.

It’s simple: Share it. Back it up.

Now let’s move on to:

How To Handle Files You Downloaded

Sure you have downloaded those files for a reason, didn’t you? Maybe it was a document you wanted to read. Or a video someone sent you. Or a presentation slide deck you used a week ago. Or was it a month? A year?

Take a look at your Desktop: How many files are there that you didn’t create and that you haven’t used for a long time?

There’s only one thing you can do with files you downloaded, after you’re done with them: Delete them!

But wait! You can’t tell me to delete that precious spreadsheet/presentation/video/document, it’s so important!”

Well, if it is so important, but you’re not using it right now (or this week or this month, pick your own usefulness window), then it may not be that important after all. And if it’s of any lasting value, you’re very likely going to be able to download it again. And again. Whenever you need it.

After all, that file that you downloaded was created by someone else some time ago, and she/he chose to share it (see above), so you could download it in the first place. The same mechanism will ensure you’ll be able to download that document again in the future, if it has any lasting value. If not, you won’t care anyway.

So feel free to delete anything you have downloaded but don’t need right now. It’s probably going to be the lion’s share of your current file usage anyway.

The other 9 GB of data I deleted yesterday were various movies, presentations, software and other artifacts derived from them that I really didn’t need anymore, or that I could easily download again, should I really need them.

Now that we identified the two types of files we have, and know what to do with them, let’s go back to our home directories:

The Real Role of Your Home Directory

Since you shared your own stuff on the net and archived it somewhere safe, while all the other files were already available on the net from the beginning, you can now get back any file on your home directory by simply downloading it, at any time.

This really means that you can now: Delete all of your files without worrying.

Think about it. This is not an unrealistic claim. After all: What would happen if your laptop broke or got stolen right now? You want to be prepared for this anyway, so go ahead and implement the two steps above (share and back up) if you haven’t already.

Now, if all of your files on your desktop and home directory can be safely deleted, why do we need a home directory at all?

Home directories should be treated like caches. They should contain what you need right now, or what you need most often. That’s it.

Right now” and “most often” are of course flexible definitions, and you’re free to redefine them however you want. The point is, your home directory is just a temporary store for your files, an aid to help you access them more quickly (or during times where you’re not connected). Not more.

Only if your disk is full, or your friendly system hero reminds you of your quota, you really need to clean it up.

Home Directory Clean Up Strategies

Now that we understand the true role of our files and home directories, let’s go back to the initial point: How to clean up your file system under the duress of “no space left on device” errors or “Your quota is full, delete 11GB by next month” messages from your sysadmin. Here are some helpful tips:

  • Remember: Your home directory is a cache for your most frequently used and your most recently used files (Cool, now you can feel like the ZFS ARC (no link, page no longer exists)!). The consequence of this is:

    • Delete everything that you haven’t used for a long time.

    • Delete everything that you don’t use often.

  • Attack the big chunks first. There’s no point in spending hours wading through minuscule dot-files. Find the biggest folder, then find the biggest folder within, and after digging through the hierarchy of biggest folders, find the biggest files to delete.

    The Unix minded will find du -ks * .??* .| sort -n useful (hat tip to Andi), the more visually oriented can look at tools like JDiskReport, Disk Inventory X or Windirstat, they all help you find the big chunks so you can delete them and save space quickly.

  • Get rid of illegal downloads. Really, they don’t help you much. What use is there in a 2TB MP3 collection if you don’t have the time to really listen and appreciate each song? I’m not a proponent of RIAA’s views nor do I favor copy-protection laws, it’s just that to me, listening to an MP3 that I got from a friend vs. a CD that I bought is kinda like knowing the murderer from the start of the novel. It spoils the whole music appreciation thing. Just make sure all of your exisiting CD collection is available on your digital music player so you have always access to it (i.e.: Take advantage of the cache effect) and rediscover the beauty and excitement of listening to an album from start to finish while browsing the booklet and being part of your favourite band’s experience. Same goes for DVDs. If they’re too expensive, use a renting service or rent your movies online, use a DVR, etc. Take control of your musical and movie-watching experience, don’t let them own you.

Looking at your desktop and home directory as only a cache to facilitate quick access to your most frequently used and most recently used files is a liberating experience, try it!

Finding a Good Filing Strategy

While we’re cleaning up our home directories, it may be good to introduce a simple filing strategy, so your stuff is in order.

To some extent, the same “search” rule applies that we discussed already for emails: Search technology has invaded our desktops, so no matter where we put our files, we’re likely to find them anyway.

But documents, images, movies, etc. are a bit less easily indexed as emails, so a few ordering principles may be helpful. This is what works well for me:

  • Use one folder for everything you download. Most web browsers do this automatically now (you probably have a “Downloads” directory already), and this simple thing makes it easy to clean up: Just delete all the contents of your “Downloads” folder.

  • Use one folder per project. Again, a very simple, but helpful rule. Everything that is related to a project goes into the same folder. Documentation, meeting notes, RFP documents, code, whatever. Remember: Almost all projects involve other people, so set up your project folder on a shared infrastructure from the start. This will also take care of backups and archiving. Then, when you realize this folder hasn’t been touched for a couple of years on your drive, you know what to do: Delete it.

  • Store generic information separately from projects. Generic information may be manuals, How-To-Documents, presentation files, code you downloaded etc. They’re typically not tied to a project, so they should go into a separate folder (you may call it “info”). Since all of this has been downloaded anyway, cleaning up your “info” folder is easy, but you knew that already, didn’t you?

  • Store your own creations separately. This is what you most likely want to share, backup & archive, because you can’t download it again (yet). Make sure they’re easy to find, so you share them often. Any creation of yours is most probably a “project” anyway, so store them in your “projects” folder.

  • Leverage time as an ordering tool. Your brain is wired to understand time, so use that to get order into your files. If you have too many folders, sort them by year. Name your files “20100401_foobar” or something similar, so they always appear in time order even if you don’t ask your file browser to. This makes archiving and deleting old stuff very easy.

The Psycho Edge to Using Your Home Directory

The truth is: We’re hunter-gatherers. Our animal brains are wired to continuously hunt new stuff (music, movies, presentations, documentation, software, whatever), then stash it into our caverns (read: your hard drive) in case food gets scarce.

In the Age of Information and Participation, this doesn’t make any sense. All of the stuff you need is just a click away, and all of the stuff you create should be shared, otherwise it loses its meaning. Hunting and gathering doesn’t make any sense now. Worse yet: It gets in the way of creating something new, learning a new thing, or living a new experience.

So free yourself from too much data and learn to live from download-to-mouth instead of clinging to a “precious” collection of files. It’ll make your IT life a lot lighter!

Your Thoughts

What’s your trick to get your files organized? How do you share your creations? Do you still live out of your laptop harddisk or have you spread everything out into the cloud so you can wander free and not care about mortal hard drives? Feel free to share your thoughts in the comments section!

Dedication

This post is dedicated to Mike (no link, sun.com no longer exists) who came up with the created-or-downloaded mantra and reminded me that cleaning up my home directory is also an opportunity to share some file management experience with the world. Thanks, Mike!

Related Post

Getting More Out Of This Blog

If you found this article useful, then add Constant Thinking to your feed reader and get more Technology Thoughts delivered right to your desktop!


Comments

Commenting is currently not available, because I’d like to avoid cookies on this site. I may or may not endeavor into building my own commenting system at some time, who knows?

Meanwhile, please use the Contact form to send me your comments.

Thank you!


Welcome

This is the blog of Constantin Gonzalez, a Solutions Architect at Amazon Web Services, with more than 25 years of IT experience.

The views expressed in this blog are my own and do not necessarily reflect the views of my current or previous employers.


Copyright © 2022 – Constantin Gonzalez – Some rights reserved.
By using this site you agree to not hold the author responsible for anything related to this site. See Site Info/Imprint for details and our information policy.

This site was built using Pelican, which is written in Python, using a homegrown theme that borrows heavily from Elegant. It is hosted on Amazon S3 and distributed through Amazon CloudFront.