from pyinfra.operations import server server.apt.update(cache_time=86400) server.apt.upgrade()