Skip to main content

Remove-IMMemory

SYNOPSIS

Removes an Immich memory collection.

SYNTAX

Remove-IMMemory [[-Session] <ImmichSession>] [-id] <String[]> [-ProgressAction <ActionPreference>] [-WhatIf]
[-Confirm] [<CommonParameters>]

DESCRIPTION

The Remove-IMMemory function permanently deletes a memory from Immich. Memories are curated collections of assets organized around specific dates or themes, and removing them eliminates the memory collection while leaving the underlying assets intact.

This function supports pipeline input for batch operations and includes confirmation prompts to help prevent accidental deletions. The deletion only affects the memory organization structure and does not impact the individual assets contained within.

EXAMPLES

EXAMPLE 1

Remove-IMMemory -Id 'bf973405-3f2a-48d2-a687-2ed4167164be'

Removes the memory with the specified ID after confirmation prompt.

EXAMPLE 2

Remove-IMMemory -Id 'bf973405-3f2a-48d2-a687-2ed4167164be' -Confirm:$false

Removes the memory without prompting for confirmation.

EXAMPLE 3

Get-IMMemory | Where-Object Type -eq 'on_this_day' | Remove-IMMemory

Removes all 'on_this_day' type memories using pipeline processing.

EXAMPLE 4

$oldMemories = Get-IMMemory | Where-Object { $_.memoryAt -lt (Get-Date).AddYears(-2) }
$oldMemories | Remove-IMMemory -WhatIf

Shows what would happen if memories older than 2 years were removed, without actually deleting them.

PARAMETERS

-Session

Optionally define a immich session object to use. This is useful when you are connected to more than one immich instance.

-Session $Session

Type: ImmichSession
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-id

Specifies the unique identifier(s) of the memory to remove. Must be valid GUID format. Accepts pipeline input by value and by property name for batch deletion operations. This parameter has an alias 'libraryId' for compatibility purposes.

Type: String[]
Parameter Sets: (All)
Aliases: libraryId

Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

This function supports ShouldProcess for confirmation prompts. Use -WhatIf to preview changes and -Confirm to control confirmation behavior. Removing memories only affects the memory collections and does not delete the underlying assets.

EDIT THIS DOC

This page was auto-generated from the powershell command comment based help. To edit the content of this page, update the script file comment based help on github Github