Skip to content

Commit b7b52ee

Browse files
authored
Merge pull request #4797 from mvanhorn/add-make-uninstall
Makefile: add uninstall target
2 parents d5bc0f0 + cb88576 commit b7b52ee

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ help:
9898
@echo " * 'test' - Run basic unit testing."
9999
@echo " * 'binaries' - Build nerdctl."
100100
@echo " * 'install' - Install binaries to system locations."
101+
@echo " * 'uninstall' - Remove installed binaries and documentation."
101102
@echo " * 'clean' - Clean artifacts."
102103

103104
##########################
@@ -118,6 +119,14 @@ install:
118119
install -D -m 644 -t $(DESTDIR)$(DOCDIR)/nerdctl $(MAKEFILE_DIR)/docs/*.md
119120
$(call footer, $@)
120121

122+
uninstall:
123+
$(call title, $@)
124+
rm -f $(DESTDIR)$(BINDIR)/$(BINARY)
125+
rm -f $(DESTDIR)$(BINDIR)/containerd-rootless.sh
126+
rm -f $(DESTDIR)$(BINDIR)/containerd-rootless-setuptool.sh
127+
rm -rf $(DESTDIR)$(DOCDIR)/nerdctl
128+
$(call footer, $@)
129+
121130
clean:
122131
$(call title, $@)
123132
find . -name \*~ -delete
@@ -308,6 +317,7 @@ artifacts: clean
308317
help \
309318
binaries \
310319
install \
320+
uninstall \
311321
clean \
312322
lint-go lint-go-all lint-yaml lint-shell lint-commits lint-mod lint-licenses lint-licenses-all \
313323
fix-go fix-go-all fix-mod \

0 commit comments

Comments
 (0)