-
-
Notifications
You must be signed in to change notification settings - Fork 223
Expand file tree
/
Copy pathapt-packages.sh
More file actions
45 lines (38 loc) · 903 Bytes
/
apt-packages.sh
File metadata and controls
45 lines (38 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
set -e
sudo apt-get update
# Common packages across all versions
DEPS="
net-tools
ssl-cert
nvme-cli
zip
unzip
unrar
htop
ifstat
sysstat
coreutils
tree
jq
gdb
ufw
python3-pip
python3-boto
python3-boto3
"
# Install basic packages
for dep in $DEPS; do
if ! dpkg -s $dep > /dev/null 2>&1; then
echo "Attempting installation of missing package: $dep"
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -q $dep
fi
done
# Uninstall amazon-ssm-agent, which comes with Ubuntu AMI via snap.
sudo snap remove amazon-ssm-agent || true
# Uninstall snapd, which is not used by us.
sudo apt-get purge -y snapd
# Uninstall ec2-instance-connect, which is not used by us.
# This resolves ec2-instance-connect.service failure during boot,
# which causes "systemctl status" in "degraded" state.
sudo apt-get purge -y --auto-remove ec2-instance-connect