Sample Header Ad - 728x90

Should I use apt or apt-get in shell scripting?

15 votes
2 answers
12924 views
apt is the command that is being recommended by the Linux distributions. It provides the necessary option to manage the packages. It is easier to use with its fewer but easy to remember options. As quoted in **itsfoss.com** >There is no reason to stick with apt-get unless you are going to do specific operations that utilize more features of apt-get. > 1. apt is a subset of apt-get and apt-cache commands providing necessary commands for package management 2. while apt-get won’t be deprecated, as a regular user, you should start using apt more often I get this error when I use apt in shell scripts whereas it does not happen when I use apt-get instead" WARNING: apt does not have a stable CLI interface. Use with caution in scripts. **My questions are:** 1. Why doesn't apt have a stable CLI interface? 2. How can I use apt with caution or safely? 3. How can I disable this error message?
Asked by David Kariuki (865 rep)
Jun 3, 2020, 06:32 PM
Last activity: Jul 15, 2025, 01:15 PM