Skip to content

Commit 2a348e4

Browse files
committed
Add a Clean function that matches apt-get clean
This mimics what's done for other verbs available from `apt-get`.
1 parent 0d7233b commit 2a348e4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

apt.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,3 +173,10 @@ func Install(packs ...*Package) (output []byte, err error) {
173173
cmd := exec.Command("apt-get", args...)
174174
return cmd.CombinedOutput()
175175
}
176+
177+
// Clean erases downloaded archive files.
178+
func Clean() (output []byte, err error) {
179+
args := []string{"clean"}
180+
cmd := exec.Command("apt-get", args...)
181+
return cmd.CombinedOutput()
182+
}

0 commit comments

Comments
 (0)