Removed all photos, still have data
Hey. I removed all my photos from inmich but I still have 804 MB of data in my data directory. Encoded videos, thumbs and uploads of a specific UUID.
How can I get rid of it and why doesn't that happen automatically?
35 Replies
:wave: Hey @AstroB,
Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:.
References
- Container Logs:
docker compose logs
docs
- Container Status: docker ps -a
docs
- Reverse Proxy: https://immich.app/docs/administration/reverse-proxy
- Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA
Checklist
I have...
1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time).
2. :ballot_box_with_check: read applicable release notes.
3. :blue_square: reviewed the FAQs for known issues.
4. :blue_square: reviewed Github for known issues.
5. :blue_square: tried accessing Immich via local ip (without a custom reverse proxy).
6. :blue_square: uploaded the relevant information (see below).
7. :blue_square: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable
(an item can be marked as "complete" by reacting with the appropriate number)
Information
In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider:
- Your docker-compose.yml and .env files.
- Logs from all the containers and their status (see above).
- All the troubleshooting steps you've tried so far.
- Any recent changes you've made to Immich or your system.
- Details about your system (both software/OS and hardware).
- Details about your storage (filesystems, type of disks, output of commands like fdisk -l
and df -h
).
- The version of the Immich server, mobile app, and other relevant pieces.
- Any other information that you think might be relevant.
Please paste files and logs with proper code formatting, and especially avoid blurry screenshots.
Without the right information we can't work out what the problem is. Help us help you ;)
If this ticket can be closed you can use the /close
command, and re-open it later if needed.How did you remove your files?
Try to empty the trash if you didn't
I emptied it
All photos were on an external library
I removed all files in that external library
I actually just now cleaned my internal "data" directory
Do you have multiple users perhaps?
Yeah that's an interesting point
My old username was "admin"
And I changed it
And the leftover stuff was under "admin"
You changed the username or the storage template label?
Username
I don't think I messed with any template label?
I did configure the storage template iirc
i don't think a username is part of it
Weird, in any case if you don't have multiple users and you don't have any files... just delete the rest
Though I don't understand why you would go that route instead of a fresh install 😛
Why would I do a fresh install?
I just wanted to avoid complexities of restoring things that I already configured
I had the beta versions but updated to 2.0.0
Because you removed all photos 👀
Yeah I was just using that instance to test immich until a stable release happened
Do you think that this can cause corruption and/or problems with future use of my server?
And thanks for helping! 🙂
I spy @Sergey Katsubo in the thread somehow
He might have a simple SQL query to list the assets the server thinks exist
If there are none, it should be clear to delete the files, apart from the
.immich
filesI saved the file names containing the UUID looking names
The folders with UUID should match your own user's UUID
They match
And the only paths that contained "admin" somewhere in the name are
data/library/admin/*
stuff
Everything there was empty foldersSounds good, no orphaned files with the wrong user ID
Yeah so after I got rid of them I'm just not sure if future problems / data corruption will arise for some reason
running shortly
thanks!
None of the paths are what I actually deleted
I only deleted things under
encoded-video
, upload
and thumbs
thumbs live in another table in DB
^^ last 2 columns about those thumbs
Anything in
uploads
is supposedly just your transient experiments with uploading. If you mainly focused on external library.
okay, this one to cover both thumbs
and encoded-video
Wait now I realize that something is weird
Could you have archived pictures perhaps?
Files from the command you sent looked like:
/data/thumbs/<uuid>/<hex>/<hex>/<uuid>-preview.jpeg
Files I deleted look like /data/thumbs/<uuid>/<hex>/<hex>
but they can be more than 70MB in size
Are these directories with large .immich
files? wut?.immich files are top level and only contain a unix timestamp
what do you mean top level?
there's one in thumbs, one in encoded-video ...
alright
not in the UUID folders or the subfolders
then i have no idea what i touched
i can dig in a snapshot and see
Alright, there were some videos and images?
find
didn't see any files for some reason?
I'm confused
Or I just missed them
None of the thumb file names match anything in the DB
encodedVideoPath
is empty for everything
Is that good?Doesn't make encodes if there's no encode policy that applies
Alright so it sounds like my server is alright to use... Thanks!
Btw if you'd like to start from scratch with 0 asset records in the database you can
TRUNCATE TABLE asset CASCADE;
Yeah I won't do that, I already started syncing stuff from my phone and I'm going to add more users...
Wait
Will immich re-scan my existing data directory? Will I lose pics / videos?
No it doesn't know anything exists in the data directory if it's not in the database
I'll keep the state as is then
Thanks!