We have lots of puppet modules, so have switched to using the rsync mode to speed up code deploys. When modules are no longer required and removed from the Puppetfile, librarian-puppet is not taking any action to remove the obsolete modules from the modules directory.
# Module is present in thirdparty directory (where modules are installed)
[~/puppet] $ ls -ld thirdparty/local_mysql
drwxr-xr-x 6 ben users 4096 Sep 23 11:31 thirdparty/local_mysql
# Module is removed from Puppetfile, librarian-puppet doesn't clean up
[~/puppet] $ grep local_mysql Puppetfile
[~/puppet] $ /opt/puppetlabs/puppet/bin/librarian-puppet install
[~/puppet] $ ls -ld thirdparty/local_mysql
drwxr-xr-x 6 ben users 4096 Sep 23 11:31 thirdparty/local_mysql
# Manually deleting, it does not get re-added, as expected
[~/puppet] $rm -rf thirdparty/local_mysql
[~/puppet] $ /opt/puppetlabs/puppet/bin/librarian-puppet install
[~/puppet] $ ls -ld thirdparty/local_mysql
[~/puppet] $
We have lots of puppet modules, so have switched to using the rsync mode to speed up code deploys. When modules are no longer required and removed from the Puppetfile, librarian-puppet is not taking any action to remove the obsolete modules from the modules directory.