Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Added DistUpgrade method
  • Loading branch information
SamyGhannad committed Oct 26, 2018
commit 6cd8a367badd572817f0edc5fab64d0c119cff8c
6 changes: 6 additions & 0 deletions apt.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ func UpgradeAll() (output []byte, err error) {
return cmd.CombinedOutput()
}

// DistUpgrade upgrades all upgradable packages, it may remove older versions to install newer ones.
func DistUpgrade() (output []byte, err error) {
cmd := exec.Command("apt-get", "dist-upgrade", "-y")
return cmd.CombinedOutput()
}

// Remove removes a set of packages
func Remove(packs ...*Package) (output []byte, err error) {
args := []string{"remove", "-y"}
Expand Down