Timeshift -- how to delete folder?

Shmu26

Member
Joined
Dec 11, 2018
Messages
95
Reaction score
32
Credits
624
I deleted snapshots, uninstalled Timeshift, but the folder is still using up 13 GB and I can't delete it. How to delete the Timeshift folder?
Ubuntu 18.10
 


G'day @Shmu26 and did you get that Logitech mouse sorted?

On Timeshift, what is the path to the folder?

Is it the default, ie in your Home folder or partition, or in its own dedicated partition, or even on a separate drive?

If you have any screenshots or output from errors that would be cool.

Cheers

Chris Turner
wizardfromoz
 
A right click does not show an option for delete.
I think it is a permission problem.
How to delete as root?
see screenshot
Screenshot from 2018-12-28 15-40-37.png
 
Yes, permissions. Right now, the Timeshift folder, and its contents are owned by / (root).

Open the terminal and execute the command:

pkexec nautilus

Enter your user password when prompted. This should open your file browser (Nautilus) with elevated permissions (i.e., it has root permissions), navigate to the /timeshift folder and just right-click and select "delete" This will permanently delete the folder /timeshift and all of it's contents . (Make sure you use delete and not "move to trash". If you "move to trash" the files will get moved to root's trash folder where they will still take up space and be devilishly difficult to remove permanently). Close Nautilus.

There are a bunch of other ways to do this. The key is remembering you have to change the permissions of all of the files/folders contained by the parent folder (in this case, /Timeshift) too.
 
Last edited:
I don't get why TimeShift does this as well. But I found escalating to root user allows you to delete. Even in the GUI screen.

Pretty annoying if you has to dump it every now and then to make room. That why I gotten a 1TB USB drive, so it should allows me to take snapshots manually every now and then and keep quite a few of them concurrently.
 
Timeshift has to run with / (root) permissions because the files it has to deal with have / (root) permissions, too.

Don't think of it as annoying. Remember that at heart Linux is a multi-user operating system. The permissions system is protection against a user (that's you) doing something untoward to the entire system and all the other users (although on a desktop PC or laptop there typically won't be other users).
 
Timeshift has to run with / (root) permissions because the files it has to deal with have / (root) permissions, too.

Don't think of it as annoying. Remember that at heart Linux is a multi-user operating system. The permissions system is protection against a user (that's you) doing something untoward to the entire system and all the other users (although on a desktop PC or laptop there typically won't be other users).
I meant the fact that despite deleting all of your snapshots you still have to MANUALLY delete the folder itself to remove all of the contents.
 
I see.

I don't see that here. If I remove all the snapshots from my external drive the only thing left behind are some hard links of 32 bytes each (one per snapshot) in the ondemand folder. These get cleaned up automatically the next time I create snapshot.

Are you deleting the snapshots using the delete button on the Timeshift application menu? When I do that, the space available on the target drive telltale updates immediately. I don't have to completely remove the Timeshift folder to get the space back.

I'm not sure what happens if you just delete a snapshot with the file browser or from the command prompt. Timeshift makes some creative use of hardlinks and softlinks and perhaps just deleting the snapshot leaves artifacts. I read somewhere over on the LinuxMint Fourms when Timeshift was first introduced that snapshots should only be removed by the application. I've been doing that and haven't had any problems in more than a year.
 
Yea it was when I deleted all of them through the GUI and only deleted the folder itself once I found out that what was left on my USB stick.
 
Folks, hi - I was actually leading somewhere with my questions at #2, and so I will pick up on that momentarily.

For those who don't know, which is the 3 of you, you can ask any and all questions on Timeshift at my Tutorial here

https://www.linux.org/threads/timeshift-similar-solutions-safeguard-recover-your-linux.15241/

I have been using it since version 1.4 (that is not a typo), around 5 years coming up.

BTW a belated welcome to linux.org, to all (I have already made the acquaintance of the OP, Shmu) :)

I have a document partially completed for placing in the Timeshift Tute, involving housekeeping after removing Timeshift, and it looks a little like this, if you can follow it, it relates to files and folders that are created or occupied with a presence, by Timeshift's installation and operation, with a view to seeing what needs cleaning up, if anything, after an uninstall.

/etc - timeshift.json


/etc/default - timeshift.json


/usr/bin

/usr/share -


/usr/share/appdata


/usr/share/doc


/var/lib/dpkg/info


/var/log


/usr/share/icons/hicolor

- 16x16/apps , through to 128x128/apps ... numerous files 790 bytes to 4Kb of timeshift.png (58 .png, 2 .svg)


/usr/share/polkit-1/actions


Also check

/usr/share/linuxmint/mintreport/reports

That last one

/usr/share/linuxmint/mintreport/reports

... is one which is confined only to Linux Mint. Other Distros that ship with Timeshift installed - Linux Lite v4.x series and Manjaro 'Strit' ... do not include this part. That is because Clement Lefebvre and his team at Linux Mint put their own spin on Timeshift, a little.

Timeshift was incorporated into Linux Mint with 18.3 'Sylvia' (and the OP has 18.3 Cinnamon) and then backported to cover 18.0 'Sarah', 18.1 'Serena', and 18.2 'Sonya'. Users were then advised to take a Timeshift snapshot before upgrading to 18.3 'Sylvia'.

18.3 uses v17.11, but the OP is on Ubuntu, so if @Shmu26 still had his installed, he could check that at Menu - About. We are now up to v18.9.1 awaiting v19 early next year, I expect.

I use Timeshift with every single Distro (about 80) that I have, with about 27 on this Dell Inspiron so far, as you can see


42od6l7.png


SCREENSHOT 1 - WIZARD'S TIMESHIFT RECORD

... well, it tells me 30 Distros, lol.

I'm not sure what happens if you just delete a snapshot with the file browser or from the command prompt.

We could find out over at the Tute? It has closer to 13,000 views than not (just passed one year since I wrote it), not just here but on the Internet, and so the answers can benefit many whom follow it.

...snapshots should only be removed by the application.

That is a part of author Tony George's instructions, he wrote it, so likely he knows.

Anyway, I'll get off my soapbox and let's get back to helping the OP.

Cheers all, Saturday in Oz, so enjoy your Linux and

Avagudweegend

Chris Turner
wizardfromoz
 
Yes, permissions. Right now, the Timeshift folder, and its contents are owned by / (root).

Open the terminal and execute the command:

pkexec nautilus

Enter your user password when prompted. This should open your file browser (Nautilus) with elevated permissions (i.e., it has root permissions), navigate to the /timeshift folder and just right-click and select "delete" This will permanently delete the folder /timeshift and all of it's contents . (Make sure you use delete and not "move to trash". If you "move to trash" the files will get moved to root's trash folder where they will still take up space and be devilishly difficult to remove permanently). Close Nautilus.

There are a bunch of other ways to do this. The key is remembering you have to change the permissions of all of the files/folders contained by the parent folder (in this case, /Timeshift) too.
That command did not work for me in Ubuntu 18.10. I got a dialogue box asking for my password, which I entered (my user account is an admin account) but I got this:
pkexec nautilus
Unable to init server: Could not connect: Connection refused
(nautilus:6409): Gtk-WARNING **: 18:21:02.340: cannot open display:
 
Yes, it does. It also works if you enter the wrong directory by mistake, or get a bit confused with the folder path if you are working with lower level directories. I don't normally recommend it to new users because you can't really see what is going to happen, but the command does work.

My bad for post #4. Ubuntu doesn't install the required admin file for nautilus to run as root via pkexec by default. You can fix that by opening a terminal, then:

sudo apt install nautilus-admin
enter you user password when prompted

once that is installed, you should be able to start nautilus with elevated privileges by entering:

pkexec nautilus

from a terminal command prompt. Note the first time you try this it may ask you for your password two times. This should only happen on first execution.

In any case, I'm happy to see you got your original question sorted.
 
I like your way better, because, as you said, you can see what you are about to destroy. I am still having trouble with it, though. I installed the package:
sudo apt install nautilus-admin
[sudo] password for ME:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
kde-config-mailtransport kio libaio1 libgsoap-2.8.60 libkf5completion-data
libkf5completion5 libkf5doctools5 libkf5jobwidgets-data libkf5jobwidgets5
libkf5kiocore5 libkf5kiontlm5 libkf5kiowidgets5 libkf5mailtransport-data
libkf5mailtransport5abi2 libkf5mime-data libkf5mime5abi2 libkf5solid5
libkf5solid5-data libkf5sonnet5-data libkf5sonnetcore5 libkf5sonnetui5
libkf5textwidgets-data libkf5textwidgets5 libkpimsmtp5 libqt5script5
libvncserver1 mysql-client-core-5.7 mysql-server-core-5.7
qml-module-qtgraphicaleffects qml-module-qtquick-window2 qml-module-qtquick2
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
gir1.2-nautilus-3.0 python-nautilus
The following NEW packages will be installed:
gir1.2-nautilus-3.0 nautilus-admin python-nautilus
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 31.7 kB of archives.
After this operation, 191 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://il.archive.ubuntu.com/ubuntu cosmic/main amd64 gir1.2-nautilus-3.0 amd64 1:3.26.4-0ubuntu7 [5,528 B]
Get:2 http://il.archive.ubuntu.com/ubuntu cosmic/universe amd64 python-nautilus amd64 1.2.2-1 [18.1 kB]
Get:3 http://il.archive.ubuntu.com/ubuntu cosmic/universe amd64 nautilus-admin all 1.1.7-1 [8,076 B]
Fetched 31.7 kB in 1s (56.8 kB/s)
Selecting previously unselected package gir1.2-nautilus-3.0:amd64.
(Reading database ... 204818 files and directories currently installed.)
Preparing to unpack .../gir1.2-nautilus-3.0_1%3a3.26.4-0ubuntu7_amd64.deb ...
Unpacking gir1.2-nautilus-3.0:amd64 (1:3.26.4-0ubuntu7) ...
Selecting previously unselected package python-nautilus.
Preparing to unpack .../python-nautilus_1.2.2-1_amd64.deb ...
Unpacking python-nautilus (1.2.2-1) ...
Selecting previously unselected package nautilus-admin.
Preparing to unpack .../nautilus-admin_1.1.7-1_all.deb ...
Unpacking nautilus-admin (1.1.7-1) ...
Setting up gir1.2-nautilus-3.0:amd64 (1:3.26.4-0ubuntu7) ...
Setting up python-nautilus (1.2.2-1) ...
Setting up nautilus-admin (1.1.7-1) ...

But I still get:
pkexec nautilus
Unable to init server: Could not connect: Connection refused
 
Ah...we may be afoul of me making bad assumptions. Are you running the KDE desktop? It makes a difference.

If you're not using KDE then something else is not properly configured. Let me do some research.
 
Ah...we may be afoul of me making bad assumptions. Are you running the KDE desktop? It makes a difference.
I am running the default desktop of ubuntu 18.10. I think it is gnome, but I am kind of noobish...
 
Ok, just needed to make sure...I saw some KDE apps in the removal queue.

Next question, verify policykit is installed:

sudo apt install policykit

Might be:

sudo apt install policykit-1

I thought this was installed by default -- I don't remember doing it as a separate action -- but I could be wrong.
 
I don't remember doing it as a separate action -- but I could be wrong.

That is because it was already installed as a part of previous commands such as

Code:
sudo apt install nautilus-admin

Using

Code:
apt-cache policy policykit-1

However, since installing nautilus-admin, Shmu should find that he can open Nautilus by regular means, right-click on a folder such as /etc/default or other system folder and find the entry about Administrator. The same applies with the GNOME text editor gedit for text files such as grub.

Wiz
 

Members online


Latest posts

Top