Index: bin/stamps
===================================================================
--- bin/stamps	(revision 30)
+++ bin/stamps	(revision 32)
@@ -21,4 +21,6 @@
     parser.add_argument('-t', '--timeline', action="store_true",
                         help='Show a timeline of recorded times')
+    parser.add_argument('-d', '--delete', action="store", type=int,
+                        help='Delete up to n recorded stamps')
 
     args = parser.parse_args()
@@ -36,4 +38,6 @@
     if args.timeline:
         s.timeline()
+    elif args.delete:
+        s.remove_stamps(args.delete)
     elif args.graph:
         s.graph_stamps(args.customer, args.filter)
Index: stamper/stamper.py
===================================================================
--- stamper/stamper.py	(revision 30)
+++ stamper/stamper.py	(revision 32)
@@ -48,8 +48,12 @@
         })
 
-    def last_stamp(self):
+    def last_stamp(self, n=1):
+        """
+        return the stamp in position -n, that is, starting from the latest one
+        and going back N positions in the list of stamps
+        """
         if not self.stamps:
             return None
-        return self.stamps[-1]
+        return self.stamps[-n]
 
     def worktime(self, start, end):
@@ -311,2 +315,28 @@
                     totalDays, remainingHr, remainingMin, HOURS_DAY
                 ))
+
+    def remove_stamps(self, n=1):
+        """
+        Remove up to n stamps back, asking for confirmation before delete
+        """
+        for i in range(n):
+            stamp = self.last_stamp()
+            if not stamp['customer']:
+                print(stamp['start'] + ' start')
+            else:
+                print(' '.join([stamp['end'],
+                                stamp['customer'],
+                                stamp['action']]))
+            confirm = ''
+            while confirm.lower() not in ['y', 'n']:
+                confirm = raw_input('delete stamp? (y/n) ')
+                confirm = confirm.lower()
+            if confirm == 'y':
+                self.stamps.pop()
+            else:
+                # if the user says no to the removal of an stamp, we cannot
+                # keep deleting stamps after that one, as that could leave the
+                # stamps in an inconsistent state.
+                print('Aborting removal of stamps')
+                break
+        self.save_stamps()
