I need to remove old backups from my SSD and my external (Western Digital) hard drive because they're taking up so much space.
Except for the most recent files/package, can I simply delete the old backups (I would think not), or do I need to actually uninstall them from my SSD and the external drive?

Looking at the file name of the backups, I don't know or understand what any of them are, so I don't know what can be removed safely, and what should remain.

enter image description here

If you're able to help, please remember I'm a newbie when it comes to Linux, so I may not have even heard of terminology that is commonplace to you. So, please be gentle. Also, I'm determined to learn as much as I can, so if you can direct me to any documentation or tutorials that would assist with this, I'd greatly appreciate it.

  • As you're a new, low-reputation user: if an answer answers your question, don't forget to click the grey ☑ under the "0" at the left of its text to accept it, which means "yes, this answer is valid"! – David Foerster Jul 6 '16 at 18:53

Using the GUI

The GUI doesn't have much options, the most you can do is go to the Scheduling tab and set the Keep setting to either "At least a year" or "At least 6 months". The application will manage storage space, by deleting old backups when it finds that the storage is low on space.

Déjà Dup

Command Line

If you are comfortable with the command line, you can run the following command in the terminal:

duplicity remove-older-than <time> [options] [--force] target_url

You can find more details about the options, and what you can do from the command line by running man duplicity.

To quote the manual:

remove-older-than
Delete all backup sets older than the given time. Old backup sets will not be deleted if backup sets newer than time depend on them. See the TIME FORMATS section for more information. Note, this action cannot be combined with backup or other actions, such as cleanup. Note also that --force will be needed to delete the files instead of just listing them.

The documentation of time and target_url are a bit large to include in here. However, here is a summary of their description available from error message.

time
The acceptible [sic] time strings are intervals (like "3D64s"), w3-datetime strings, like "2002-04-26T04:22:01-07:00" (strings like "2002-04-26T04:22:01" are also acceptable - duplicity will use the current time zone), or ordinary dates like 2/4/1997 or 2001-04-23 (various combinations are acceptable, but the month always precedes the day).

target_url
Bad URL '/home/dan/deja-dup/'.
Examples of URL strings are "scp://user@host.net:1234/path" and "file:///usr/local". See the man page for more information.

So as an example, to clean backups older than than the 1st of February 2016 in the ~/deja-dup directory, you can use the following command:

duplicity remove-older-than 2016-02-01 file:///home/$USER/deja-dup/

Note: This may not delete them directly if some of the matched backup are full backups that subsequent incremental backups may depend on them.
Also, according to the manual, this would only list the files that will be deleted. You will need to append the command with --force for the files to be deleted.

Déjà Dup uses duplicity as its backend (This means that it is basically a User Interface for duplicity).

  • Oh, Dan, this is so helpful! Thank you so much for the info and the detail- especially for the command line. – Coding Mama Jul 6 '16 at 20:14
  • Regarding the command line, I believe this could work for me. However, at the time I followed this process, the output said there wasn't anything older than the date (which was strange), so nothing was deleted. So far, I've tried this twice. I have to work at this one a little more, and make sure I did everything correctly. Once I find out for sure, I'll comment again. – Coding Mama Jul 15 '16 at 10:47

If you delete ~/deja-dup and its content you will only use past backups. If you feel that you don't need them any longer (or not as much as the storage space they occupy), you can delete them safely.

I don't know about the files on the external drive because I don't know their names or what they are. If they have very similar names to the files in ~/deja-dup, the same as above applies.

  • Thank you, David! That's along the lines of my thinking. I just wasn't sure if they should be "uninstalled", or which ones, if any, should remain. – Coding Mama Jul 6 '16 at 20:09
  • Yes, the backups on the external drive are the same- just different dates. I changed the backup location. – Coding Mama Jul 6 '16 at 20:18
  • They're "data" files – not program files or configuration files. Therefore they will not affect the operation of your system just the data at your disposal to work with. They don't need to be uninstalled and most of the time there isn't even an uninstallation procedure available. – David Foerster Jul 6 '16 at 21:02
  • Oh, I see what you're saying. Thanks for adding that. It makes things more clear. Thank you. – Coding Mama Jul 7 '16 at 2:53

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.