Yes to clean up old container images periodically you need to set up two tasks
Cleanup container images
Compact blob store.
First is to delete but this does not complete enough to clean up so you need to follow the second step also by below steps
Log in to nexus repo ->settings -> Repository ->Clean up Policies ->Create Clean up Policy
Provide a name, Set format as docker Specify criteria. Click Create
Select Repository -> Repositories ->
In The Cleanup Policy select your recently created clean up policy
Select Tasks from Administrations tab
You will see a task
Select Create Task -> Compact Blob Store ->Select the default blob store and specify your clean up schedule.
This together will help you to clean up the repository and cleans the unused docker images.