How To Install unburden-home-dir on Debian 9

In this tutorial we learn how to install unburden-home-dir on Debian 9. unburden-home-dir is Remove or move cache files automatically from users home

Introduction

In this tutorial we learn how to install unburden-home-dir on Debian 9.

What is unburden-home-dir

unburden-home-dir is:

unburden-home-dir allows users to move cache files from browsers, etc. off their home directory, i.e. on a local harddisk or tmpfs and replace them with a symbolic link to the new location (e.g. on /tmp/ or /scratch/) upon login. Optionally the contents of the directories and files can be removed instead of moved.

This is helpful at least in the following cases:

The idea-giving case are big workstation setups where $HOME is on NFS and all those caches put an unnecessary burden (hence the name) on the file server since caching over NFS doesn’t have the best performance and may clog the NFS server, too.

A similar case, but with different purpose is reducing I/O on mobile devices like laptops or netbooks to extend the battery life or reduce the wearing down of CF or SD cards, e.g. in single board computers like the Raspberry Pi or Alix or APU boards: Moving browser caches etc. off the real disk into a tmpfs filesystem reduces the amount of disk I/O which reduces the power consumption of the disk.

Another possible solution for saving non-crucial I/O is using the package eatmydata to ignore a software’s fsync calls.

The other type of use cases for unburden-home-dir is to reduce disk space usage, e.g. on devices with small disk space but a lot of RAM as seen often on boxes with flash disks or early netbooks, e.g. the first EeePC with 4GB disk space and 2GB RAM. In this case you want to move off as many cache files, etc. as possible to some tmpfs filesystem, e.g. /tmp/.

It may also help to reduce the amount of needed backup disk space by keeping those files in places where they don’t get backed up. In that case it’s an alternative to keeping the blacklist in your backup software up-to-date.

For some users it may also be helpful to stay under their quota.

The package also contains an Xsession hook which calls this script on X login for every user. But by default no files or directories are configured to be moved elsewhere, so nothing will happen automatically without configuration.

There are three methods to install unburden-home-dir on Debian 9. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install unburden-home-dir Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install unburden-home-dir using apt-get by running the following command:

sudo apt-get -y install unburden-home-dir

Install unburden-home-dir Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install unburden-home-dir using apt by running the following command:

sudo apt -y install unburden-home-dir

Install unburden-home-dir Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install unburden-home-dir using aptitude by running the following command:

sudo aptitude -y install unburden-home-dir

How To Uninstall unburden-home-dir on Debian 9

To uninstall only the unburden-home-dir package we can use the following command:

sudo apt-get remove unburden-home-dir

Uninstall unburden-home-dir And Its Dependencies

To uninstall unburden-home-dir and its dependencies that are no longer needed by Debian 9, we can use the command below:

sudo apt-get -y autoremove unburden-home-dir

Remove unburden-home-dir Configurations and Data

To remove unburden-home-dir configuration and data from Debian 9 we can use the following command:

sudo apt-get -y purge unburden-home-dir

Remove unburden-home-dir configuration, data, and all of its dependencies

We can use the following command to remove unburden-home-dir configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge unburden-home-dir

Dependencies

unburden-home-dir have the following dependencies:

References

Summary

In this tutorial we learn how to install unburden-home-dir package on Debian 9 using different package management tools: apt, apt-get and aptitude.