#Removed all photos, still have data

1 messages ยท Page 1 of 1 (latest)

mossy mountain
#

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?

night forgeBOT
#

:wave: Hey @mossy mountain,

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

#

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.

thick kite
#

How did you remove your files?

#

Try to empty the trash if you didn't

mossy mountain
mossy mountain
#

I removed all files in that external library

#

I actually just now cleaned my internal "data" directory

thick kite
#

Do you have multiple users perhaps?

mossy mountain
#

Yeah that's an interesting point

#

My old username was "admin"

#

And I changed it

#

And the leftover stuff was under "admin"

thick kite
#

You changed the username or the storage template label?

mossy mountain
#

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

thick kite
#

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 ๐Ÿ˜›

mossy mountain
#

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

thick kite
#

Because you removed all photos ๐Ÿ‘€

mossy mountain
#

Yeah I was just using that instance to test immich until a stable release happened

mossy mountain
#

And thanks for helping! ๐Ÿ™‚

thick kite
#

I spy @solar rapids 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 files

mossy mountain
#

I saved the file names containing the UUID looking names

thick kite
#

The folders with UUID should match your own user's UUID

mossy mountain
#

They match

#

And the only paths that contained "admin" somewhere in the name are data/library/admin/* stuff

#

Everything there was empty folders

thick kite
#

Sounds good, no orphaned files with the wrong user ID

mossy mountain
#

Yeah so after I got rid of them I'm just not sure if future problems / data corruption will arise for some reason

solar rapids
#
docker exec immich_postgres psql -U postgres -d immich -c 'select "originalFileName", "originalPath", "isOffline", "deletedAt" from asset'
mossy mountain
#

running shortly

#

thanks!

mossy mountain
#

I only deleted things under encoded-video, upload and thumbs

solar rapids
#

thumbs live in another table in DB

docker exec immich_postgres psql -U postgres -d immich -c 'select "originalFileName", "originalPath", "isOffline", "deletedAt", path, af.type from asset a join asset_file af on a.id = af."assetId"' 

^^ 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

docker exec immich_postgres psql -U postgres -d immich -c 'select "originalFileName", "originalPath", "encodedVideoPath", "isOffline", "deletedAt", path, af.type from asset a join asset_file af on a.id = af."assetId"'
mossy mountain
#

Wait now I realize that something is weird

thick kite
#

Could you have archived pictures perhaps?

mossy mountain
#

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?

thick kite
#

.immich files are top level and only contain a unix timestamp

mossy mountain
#

what do you mean top level?

thick kite
#

there's one in thumbs, one in encoded-video ...

mossy mountain
#

alright

thick kite
#

not in the UUID folders or the subfolders

mossy mountain
#

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?

thick kite
#

Doesn't make encodes if there's no encode policy that applies

mossy mountain
#

Alright so it sounds like my server is alright to use... Thanks!

solar rapids
#

Btw if you'd like to start from scratch with 0 asset records in the database you can TRUNCATE TABLE asset CASCADE;

mossy mountain
#

Wait

#

Will immich re-scan my existing data directory? Will I lose pics / videos?

thick kite
#

No it doesn't know anything exists in the data directory if it's not in the database

mossy mountain
#

I'll keep the state as is then