Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confused by hyp drive rm hyper://... - Cannot delete synced drive. #20

Closed
Jolg42 opened this issue Dec 14, 2020 · 3 comments
Closed

Confused by hyp drive rm hyper://... - Cannot delete synced drive. #20

Jolg42 opened this issue Dec 14, 2020 · 3 comments

Comments

@Jolg42
Copy link

Jolg42 commented Dec 14, 2020

Examples from a computer where I synced to (ie source is on the other computer).

hyp drive rm hyper://...
Accessing network...
Error: Cannot delete the root folder

hyp drive rm -r hyper://...
Accessing network...
Error: Cannot delete the root folder

hyp drive rmdir hyper://...
Accessing network...
Error: Cannot delete the root folder

hyp drive rmdir -r hyper://...
Error: URL is required

I want to delete this drive from this computer but it seems that I cannot. What should I do?

I'm curious to know where the drive is located on the filesystem (here macOS)?

@pfrazee
Copy link
Contributor

pfrazee commented Dec 14, 2020

Ah, interesting. So let me answer your 2nd question first.

I'm curious to know where the drive is located on the filesystem (here macOS)?

In the ~/.hyperspace folder, you'll find the "internal database." The hyper technology is a kind of database that acts like different things -- kind of like, for instance, if you built a filesystem on top of MySQL. (It's less insane than doing that but you get the idea.) So when you're interacting with a hyperdrive, you're interacting with that database.

It might help to think of "hyperdrives" as virtual folders.

Expanding a little more on that for those interested The "files" are stored in hyper's internal storage, and would look like nothing interesting if you looked at them. Another metaphor- it's kind of like how a .zip file contains lots of files inside it, but with hyper it's like 5-10 internal files with bits of data scattered around. It's done this way to make the hyper database as fast as possible.

I want to delete this drive from this computer but it seems that I cannot. What should I do?

So the drive rm command only deletes files inside of a hyperdrive, though intuitively I understand why you expected it to delete the drive itself.

We don't have a "delete drive" command yet, @andrewosh let's plan to talk through how that would work

@Jolg42
Copy link
Author

Jolg42 commented Dec 14, 2020

Thanks @pfrazee for the details!

Here is a snapshot of ~/.hyperspace for the curious (kinda looks like Spotify's cache 😄)

So I guess for now if I want to a complete cleanup rm -r ~/.hyperspace should do the trick.

Screen Shot 2020-12-14 at 16 57 05

@pfrazee
Copy link
Contributor

pfrazee commented Dec 14, 2020

@Jolg42 if you want to do a big unrecoverable nuke, that'd do it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants