Skip to content

Commit 5613f84

Browse files
SamyGhannadcmaglie
authored andcommitted
Added DistUpgrade method
1 parent 648b411 commit 5613f84

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

apt.go

+6
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@ func UpgradeAll() (output []byte, err error) {
142142
return cmd.CombinedOutput()
143143
}
144144

145+
// DistUpgrade upgrades all upgradable packages, it may remove older versions to install newer ones.
146+
func DistUpgrade() (output []byte, err error) {
147+
cmd := exec.Command("apt-get", "dist-upgrade", "-y")
148+
return cmd.CombinedOutput()
149+
}
150+
145151
// Remove removes a set of packages
146152
func Remove(packs ...*Package) (output []byte, err error) {
147153
args := []string{"remove", "-y"}

0 commit comments

Comments
 (0)