Accidentally deleted the /ec2-user/apt.deb file.

This is after SSHing into my EC2 instance with username ec2-user with the following command:

ssh -i <pem file path> ec2-user@ec2-54-176-4-151.us-west-1.compute.amazonaws.com

What does this apt.deb file do, and how can I go about generating a new one?

  • There is no apt.deb file inside ec2 instances by default. This is something that was created by you or the person who created the AMI.
    – Alex
    Jan 24 at 19:09

1 Answer 1


A .deb file is a Debian package. Usually, you don’t deal with them directly. The typical command which uses them is apt (it is a coincidence that your file is apt.deb), then, if you type apt install apt, apt will check if a newer version of apt is available. If it is the case, get apt.deb and install it. Then the apt.deb is no longer useful.

  • When I run apt install apt it says that the command apt is not found. Is this related to me deleting the apt.deb file? it appears the command to install stuff is yum, not apt. Jan 24 at 20:51
  • apt is on Debian (and derivatives like Ubuntu). yum is the RedHat equivalent, but it uses .rpm files instead. If you have a RedHat (or derivative), you won’t need .deb files or the apt command. Jan 24 at 21:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.