diff --git a/PVE/API2/APT.pm b/PVE/API2/APT.pm index e5c2452d..afa920a5 100644 --- a/PVE/API2/APT.pm +++ b/PVE/API2/APT.pm @@ -18,13 +18,9 @@ use AptPkg::Cache; use AptPkg::Version; use AptPkg::PkgRecords; -my $apt_cache; - my $get_apt_cache = sub { - return $apt_cache if $apt_cache; - - $apt_cache = AptPkg::Cache->new() || die "unable to initialize AptPkg::Cache\n"; + my $apt_cache = AptPkg::Cache->new() || die "unable to initialize AptPkg::Cache\n"; return $apt_cache; };